Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,6 @@ project.lock.json
*.zip
/dotnet-tpl35/
/dotnet-tpl35

# folders in macOS
.DS_Store
6 changes: 3 additions & 3 deletions NBitcoin.Tests/transaction_tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2890,9 +2890,9 @@ ScriptVerify ParseFlags(string strFlags)
[Trait("UnitTest", "UnitTest")]
public void SequenceStructParsedCorrectly()
{
Assert.True(new Sequence() == 0xFFFFFFFFU);
Assert.False(new Sequence().IsRelativeLock);
Assert.False(new Sequence().IsRBF);
Assert.True(new Sequence() == 0x000000000);
Assert.True(new Sequence().IsRelativeLock);
Assert.True(new Sequence().IsRBF);

Assert.True(new Sequence(1) == 1U);
Assert.True(new Sequence(1).IsRelativeLock);
Expand Down
2 changes: 1 addition & 1 deletion NBitcoin/NBitcoin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup>
<Version Condition=" '$(Version)' == '' ">4.0.0.59</Version>
<Version Condition=" '$(Version)' == '' ">4.0.0.60</Version>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net461;net452;netstandard1.3;netstandard1.1</TargetFrameworks>
Expand Down
10 changes: 7 additions & 3 deletions NBitcoin/Sequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@ public static Sequence Final
/// </summary>
internal const int SEQUENCE_LOCKTIME_GRANULARITY = 9;


uint _ValueInv;
uint? _ValueInv;
public uint Value
{
get
{
return 0xFFFFFFFF - _ValueInv;
if (_ValueInv.HasValue)
return 0xFFFFFFFF - _ValueInv.Value;

// enable RBF by default (see BIP125)
return 0x00000000;
}
}

public Sequence(uint value)
{
_ValueInv = 0xFFFFFFFF - value;
Expand Down