Skip to content

Commit

Permalink
bug fix correctly seria/deseria Transaction 1.0.5.23
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Oct 31, 2014
1 parent ad69e89 commit 52da25c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions NBitcoin.Tests/transaction_tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,17 @@ private void AssertCorrectlySigned(Transaction tx, Script scriptPubKey)
[Trait("UnitTest", "UnitTest")]
public void CanUseLockTime()
{
//LockTime lockTime = new LockTime(5);
//var bytes = lockTime.ToBytes();

//LockTime cloneLockTime = default(LockTime);
//new BitcoinStream(bytes).ReadWrite(ref cloneLockTime);

var tx = new Transaction();
tx.LockTime = new LockTime(4);
var clone = tx.Clone();
Assert.Equal(tx.LockTime, clone.LockTime);

Assert.Equal("Height : 0", new LockTime().ToString());
Assert.Equal(3, (int)new LockTime(3));
Assert.Equal((uint)3, (uint)new LockTime(3));
Expand Down
2 changes: 1 addition & 1 deletion NBitcoin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.22")]
[assembly: AssemblyVersion("1.0.5.23")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion NBitcoin/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public void ReadWrite(BitcoinStream stream)
stream.ReadWrite(ref nVersion);
stream.ReadWrite(ref vin);
stream.ReadWrite(ref vout);
stream.ReadWrite(ref nLockTime);
nLockTime.ReadWrite(stream);
}

#endregion
Expand Down

0 comments on commit 52da25c

Please sign in to comment.