mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
test: Return dict in MiniWallet::send_to
This commit is contained in:
@@ -96,7 +96,7 @@ class RESTTest (BitcoinTestFramework):
|
||||
self.wallet = MiniWallet(self.nodes[0])
|
||||
|
||||
self.log.info("Broadcast test transaction and sync nodes")
|
||||
txid, _ = self.wallet.send_to(from_node=self.nodes[0], scriptPubKey=getnewdestination()[1], amount=int(0.1 * COIN))
|
||||
txid = self.wallet.send_to(from_node=self.nodes[0], scriptPubKey=getnewdestination()[1], amount=int(0.1 * COIN))["txid"]
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("Test the /tx URI")
|
||||
@@ -173,7 +173,7 @@ class RESTTest (BitcoinTestFramework):
|
||||
# found with or without /checkmempool.
|
||||
|
||||
# do a tx and don't sync
|
||||
txid, _ = self.wallet.send_to(from_node=self.nodes[0], scriptPubKey=getnewdestination()[1], amount=int(0.1 * COIN))
|
||||
txid = self.wallet.send_to(from_node=self.nodes[0], scriptPubKey=getnewdestination()[1], amount=int(0.1 * COIN))["txid"]
|
||||
json_obj = self.test_rest_request(f"/tx/{txid}")
|
||||
# get the spent output to later check for utxo (should be spent by then)
|
||||
spent = (json_obj['vin'][0]['txid'], json_obj['vin'][0]['vout'])
|
||||
|
Reference in New Issue
Block a user