diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index eca574b23..e86f942eb 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -43,8 +43,8 @@ class WalletTest (BitcoinTestFramework): self.nodes[1].generate(101) self.sync_all() - # These are different from upstream because Hush does not have a - # Founders Reward + # These are different from upstream because Hush does not have a + # Founders Reward assert_equal(self.nodes[0].getbalance(), 160000) assert_equal(self.nodes[1].getbalance(), 12.5) assert_equal(self.nodes[2].getbalance(), 0) @@ -480,7 +480,7 @@ class WalletTest (BitcoinTestFramework): assert(myopid) except JSONRPCException,e: errorString = e.error['message'] - print errorString + print errorString assert(False) # This fee is larger than the default fee and since amount=0 diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index 286840844..8ddbc676e 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -108,6 +108,7 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi } } + if ( !tx.IsNull() && n >= 0 && n < (int32_t)tx.vout.size() ) { ptr = (uint8_t *)tx.vout[n].scriptPubKey.data(); @@ -119,7 +120,7 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi fprintf(stderr,"got scriptPubKey[%d] via rawtransaction ht.%d %s\n",m,height,txid.GetHex().c_str()); return(i); } - else if ( !tx.IsNull() ) + else fprintf(stderr,"gettxout_scriptPubKey ht.%d n.%d > voutsize.%d\n",height,n,(int32_t)tx.vout.size()); return(-1);