@@ -143,6 +143,20 @@ def run_test(self):
143
143
rawtx = self .nodes [0 ].createrawtransaction (inputs , outputs )
144
144
decrawtx = self .nodes [0 ].decoderawtransaction (rawtx )
145
145
assert_equal (decrawtx ['vin' ][0 ]['sequence' ], 1000 )
146
+
147
+ inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000" , 'vout' : 1 , 'sequence' : - 1 }]
148
+ outputs = { self .nodes [0 ].getnewaddress () : 1 }
149
+ assert_raises (JSONRPCException , self .nodes [0 ].createrawtransaction , inputs , outputs )
150
+
151
+ inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000" , 'vout' : 1 , 'sequence' : 4294967296 }]
152
+ outputs = { self .nodes [0 ].getnewaddress () : 1 }
153
+ assert_raises (JSONRPCException , self .nodes [0 ].createrawtransaction , inputs , outputs )
154
+
155
+ inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000" , 'vout' : 1 , 'sequence' : 4294967294 }]
156
+ outputs = { self .nodes [0 ].getnewaddress () : 1 }
157
+ rawtx = self .nodes [0 ].createrawtransaction (inputs , outputs )
158
+ decrawtx = self .nodes [0 ].decoderawtransaction (rawtx )
159
+ assert_equal (decrawtx ['vin' ][0 ]['sequence' ], 4294967294 )
146
160
147
161
if __name__ == '__main__' :
148
162
RawTransactionsTest ().main ()
0 commit comments