Ensure that sequence number is preserved on after serialize->deserialize

This commit is contained in:
Zaki Manian 2015-08-27 15:46:22 -07:00
parent c7c1122123
commit c9980dc9b2
1 changed files with 4 additions and 0 deletions

View File

@ -769,6 +769,8 @@ describe('Transaction', function() {
var serialized_tx = transaction.uncheckedSerialize();
var copy = new Transaction(serialized_tx);
serialized_tx.should.equal(copy.uncheckedSerialize());
copy.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER)
});
it('should serialize correctly for a block height locktime', function() {
var transaction= new Transaction()
@ -777,6 +779,8 @@ describe('Transaction', function() {
var serialized_tx = transaction.uncheckedSerialize();
var copy = new Transaction(serialized_tx);
serialized_tx.should.equal(copy.uncheckedSerialize());
copy.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER)
});
});