@@ -83,7 +83,6 @@ def run_test(self):
8383
8484 self .getrawtransaction_tests ()
8585 self .createrawtransaction_tests ()
86- self .signrawtransactionwithwallet_tests ()
8786 self .sendrawtransaction_tests ()
8887 self .sendrawtransaction_testmempoolaccept_tests ()
8988 self .decoderawtransaction_tests ()
@@ -259,55 +258,6 @@ def createrawtransaction_tests(self):
259258 self .nodes [2 ].createrawtransaction (inputs = [{'txid' : TXID , 'vout' : 9 }], outputs = [{address : 99 }, {address2 : 99 }, {'data' : '99' }]),
260259 )
261260
262- def signrawtransactionwithwallet_tests (self ):
263- for type in ["bech32" , "p2sh-segwit" , "legacy" ]:
264- self .log .info (f"Test signrawtransactionwithwallet with missing prevtx info ({ type } )" )
265- addr = self .nodes [0 ].getnewaddress ("" , type )
266- addrinfo = self .nodes [0 ].getaddressinfo (addr )
267- pubkey = addrinfo ["scriptPubKey" ]
268- inputs = [{'txid' : TXID , 'vout' : 3 , 'sequence' : 1000 }]
269- outputs = {self .nodes [0 ].getnewaddress (): 1 }
270- rawtx = self .nodes [0 ].createrawtransaction (inputs , outputs )
271-
272- prevtx = dict (txid = TXID , scriptPubKey = pubkey , vout = 3 , amount = 1 )
273- succ = self .nodes [0 ].signrawtransactionwithwallet (rawtx , [prevtx ])
274- assert succ ["complete" ]
275-
276- if type == "legacy" :
277- del prevtx ["amount" ]
278- succ = self .nodes [0 ].signrawtransactionwithwallet (rawtx , [prevtx ])
279- assert succ ["complete" ]
280- else :
281- assert_raises_rpc_error (- 3 , "Missing amount" , self .nodes [0 ].signrawtransactionwithwallet , rawtx , [
282- {
283- "txid" : TXID ,
284- "scriptPubKey" : pubkey ,
285- "vout" : 3 ,
286- }
287- ])
288-
289- assert_raises_rpc_error (- 3 , "Missing vout" , self .nodes [0 ].signrawtransactionwithwallet , rawtx , [
290- {
291- "txid" : TXID ,
292- "scriptPubKey" : pubkey ,
293- "amount" : 1 ,
294- }
295- ])
296- assert_raises_rpc_error (- 3 , "Missing txid" , self .nodes [0 ].signrawtransactionwithwallet , rawtx , [
297- {
298- "scriptPubKey" : pubkey ,
299- "vout" : 3 ,
300- "amount" : 1 ,
301- }
302- ])
303- assert_raises_rpc_error (- 3 , "Missing scriptPubKey" , self .nodes [0 ].signrawtransactionwithwallet , rawtx , [
304- {
305- "txid" : TXID ,
306- "vout" : 3 ,
307- "amount" : 1
308- }
309- ])
310-
311261 def sendrawtransaction_tests (self ):
312262 self .log .info ("Test sendrawtransaction with missing input" )
313263 inputs = [{'txid' : TXID , 'vout' : 1 }] # won't exist
0 commit comments