Skip to content

Commit

Permalink
code review and reset file perms
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Mar 4, 2019
1 parent c3eb0c7 commit 0db2d15
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ script: |
cp -rf contrib/windeploy $BUILD_DIR
cd $BUILD_DIR/windeploy
mkdir unsigned
cp $OUTDIR/bitcoin-*setup-unsigned.exe unsigned/
cp $OUTDIR/dashcore-*setup-unsigned.exe unsigned/
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
Expand Down
8 changes: 4 additions & 4 deletions doc/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,22 @@ Codesigner only: Create Windows/OS X detached signatures:

Codesigner only: Sign the osx binary:

transfer bitcoin-osx-unsigned.tar.gz to osx for signing
tar xf bitcoin-osx-unsigned.tar.gz
transfer dashcore-osx-unsigned.tar.gz to osx for signing
tar xf dashcore-osx-unsigned.tar.gz
./detached-sig-create.sh -s "Key ID"
Enter the keychain password and authorize the signature
Move signature-osx.tar.gz back to the gitian host

Codesigner only: Sign the windows binaries:

tar xf bitcoin-win-unsigned.tar.gz
tar xf dashcore-win-unsigned.tar.gz
./detached-sig-create.sh -key /path/to/codesign.key
Enter the passphrase for the key when prompted
signature-win.tar.gz will be created

Codesigner only: Commit the detached codesign payloads:

cd ~/bitcoin-detached-sigs
cd ~/dashcore-detached-sigs
checkout the appropriate branch for this release series
rm -rf *
tar xf signature-osx.tar.gz
Expand Down
Empty file modified qa/rpc-tests/bip68-112-113-p2p.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/bip68-sequence.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/getblocktemplate_longpoll.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/maxuploadtarget.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/nulldummy.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/p2p-compactblocks.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/prioritise_transaction.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/smartfees.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/test_framework/comptool.py
100644 → 100755
Empty file.
Empty file modified qa/rpc-tests/test_framework/mininode.py
100644 → 100755
Empty file.
54 changes: 27 additions & 27 deletions qa/rpc-tests/test_framework/test_framework.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,33 @@ def main(self):
logging.shutdown()
sys.exit(1)

def _start_logging(self):
# Add logger and logging handlers
self.log = logging.getLogger('TestFramework')
self.log.setLevel(logging.DEBUG)
# Create file handler to log all messages
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log')
fh.setLevel(logging.DEBUG)
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
ch = logging.StreamHandler(sys.stdout)
# User can provide log level as a number or string (eg DEBUG). loglevel was caught as a string, so try to convert it to an int
ll = int(self.options.loglevel) if self.options.loglevel.isdigit() else self.options.loglevel.upper()
ch.setLevel(ll)
# Format logs the same as bitcoind's debug.log with microprecision (so log files can be concatenated and sorted)
formatter = logging.Formatter(fmt = '%(asctime)s.%(msecs)03d000 %(name)s (%(levelname)s): %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
fh.setFormatter(formatter)
ch.setFormatter(formatter)
# add the handlers to the logger
self.log.addHandler(fh)
self.log.addHandler(ch)

if self.options.trace_rpc:
rpc_logger = logging.getLogger("BitcoinRPC")
rpc_logger.setLevel(logging.DEBUG)
rpc_handler = logging.StreamHandler(sys.stdout)
rpc_handler.setLevel(logging.DEBUG)
rpc_logger.addHandler(rpc_handler)


MASTERNODE_COLLATERAL = 1000

Expand Down Expand Up @@ -547,33 +574,6 @@ def mine_quorum(self, expected_valid_count=10):

sync_blocks(self.nodes)

def _start_logging(self):
# Add logger and logging handlers
self.log = logging.getLogger('TestFramework')
self.log.setLevel(logging.DEBUG)
# Create file handler to log all messages
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log')
fh.setLevel(logging.DEBUG)
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
ch = logging.StreamHandler(sys.stdout)
# User can provide log level as a number or string (eg DEBUG). loglevel was caught as a string, so try to convert it to an int
ll = int(self.options.loglevel) if self.options.loglevel.isdigit() else self.options.loglevel.upper()
ch.setLevel(ll)
# Format logs the same as bitcoind's debug.log with microprecision (so log files can be concatenated and sorted)
formatter = logging.Formatter(fmt = '%(asctime)s.%(msecs)03d000 %(name)s (%(levelname)s): %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
fh.setFormatter(formatter)
ch.setFormatter(formatter)
# add the handlers to the logger
self.log.addHandler(fh)
self.log.addHandler(ch)

if self.options.trace_rpc:
rpc_logger = logging.getLogger("BitcoinRPC")
rpc_logger.setLevel(logging.DEBUG)
rpc_handler = logging.StreamHandler(sys.stdout)
rpc_handler.setLevel(logging.DEBUG)
rpc_logger.addHandler(rpc_handler)

# Test framework for doing p2p comparison testing, which sets up some bitcoind
# binaries:
# 1 binary: test binary
Expand Down
Empty file modified qa/rpc-tests/wallet-hd.py
100644 → 100755
Empty file.
14 changes: 7 additions & 7 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2538,6 +2538,12 @@ void CWallet::AvailableCoins(std::vector<COutput>& vCoins, bool fOnlySafe, const
if (nDepth == 0 && !pcoin->InMempool())
continue;

bool safeTx = pcoin->IsTrusted();

if (fOnlySafe && !safeTx) {
continue;
}

for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++) {
bool found = false;
if(nCoinType == ONLY_DENOMINATED) {
Expand All @@ -2554,12 +2560,6 @@ void CWallet::AvailableCoins(std::vector<COutput>& vCoins, bool fOnlySafe, const
}
if(!found) continue;

bool safeTx = pcoin->IsTrusted();

if (fOnlySafe && !safeTx) {
continue;
}

isminetype mine = IsMine(pcoin->tx->vout[i]);
if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO &&
(!IsLockedCoin((*it).first, i) || nCoinType == ONLY_1000) &&
Expand Down Expand Up @@ -3227,7 +3227,7 @@ int CWallet::CountInputsWithAmount(CAmount nInputAmount)
int nDepth = pcoin->GetDepthInMainChain();

for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++) {
COutput out = COutput(pcoin, i, nDepth, true, true);
COutput out = COutput(pcoin, i, nDepth, true, true, false);
COutPoint outpoint = COutPoint(out.tx->GetHash(), out.i);

if(out.tx->tx->vout[out.i].nValue != nInputAmount) continue;
Expand Down

0 comments on commit 0db2d15

Please sign in to comment.