test: Return dict in MiniWallet::send_to

This commit is contained in:
MarcoFalke
2023-05-12 15:27:05 +02:00
parent 9d85c03620
commit faf4315c88
8 changed files with 20 additions and 16 deletions

View File

@@ -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'])