File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,15 @@ def run_test(self):
130
130
self .nodes [2 ].lockunspent , False ,
131
131
[{"txid" : unspent_0 ["txid" ], "vout" : 999 }])
132
132
133
+ # An output should be unlocked when spent
134
+ unspent_0 = self .nodes [1 ].listunspent ()[0 ]
135
+ self .nodes [1 ].lockunspent (False , [unspent_0 ])
136
+ tx = self .nodes [1 ].createrawtransaction ([unspent_0 ], { self .nodes [1 ].getnewaddress () : 1 })
137
+ tx = self .nodes [1 ].fundrawtransaction (tx )['hex' ]
138
+ tx = self .nodes [1 ].signrawtransactionwithwallet (tx )["hex" ]
139
+ self .nodes [1 ].sendrawtransaction (tx )
140
+ assert_equal (len (self .nodes [1 ].listlockunspent ()), 0 )
141
+
133
142
# Have node1 generate 100 blocks (so node0 can recover the fee)
134
143
self .nodes [1 ].generate (100 )
135
144
self .sync_all ([self .nodes [0 :3 ]])
You can’t perform that action at this time.
0 commit comments