Skip to content

Commit 8984cde

Browse files
committed
dotnet format issues
1 parent d19c6c6 commit 8984cde

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

src/BitcoinKernel.Core/Abstractions/BlockIndex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ public BlockHeader GetBlockHeader()
6363

6464
return new BlockHeader(headerPtr);
6565
}
66-
}
66+
}

tests/BitcoinKernel.Core.Tests/BlockValidationStateTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ public class BlockValidationStateTests
1010
public void Create_ShouldCreateValidState()
1111
{
1212
using var state = new BlockValidationState();
13-
13+
1414
Assert.NotNull(state);
1515
}
1616

1717
[Fact]
1818
public void ValidationMode_NewState_ShouldReturnValid()
1919
{
2020
using var state = new BlockValidationState();
21-
21+
2222
var mode = state.ValidationMode;
23-
23+
2424
Assert.Equal(ValidationMode.VALID, mode);
2525
}
2626

2727
[Fact]
2828
public void ValidationResult_NewState_ShouldReturnUnset()
2929
{
3030
using var state = new BlockValidationState();
31-
31+
3232
var result = state.ValidationResult;
33-
33+
3434
Assert.Equal(Interop.Enums.BlockValidationResult.UNSET, result);
3535
}
3636

@@ -39,7 +39,7 @@ public void Copy_ShouldCreateIndependentCopy()
3939
{
4040
using var original = new BlockValidationState();
4141
using var copy = original.Copy();
42-
42+
4343
Assert.NotNull(copy);
4444
Assert.Equal(original.ValidationMode, copy.ValidationMode);
4545
Assert.Equal(original.ValidationResult, copy.ValidationResult);
@@ -49,7 +49,7 @@ public void Copy_ShouldCreateIndependentCopy()
4949
public void Dispose_ShouldAllowMultipleCalls()
5050
{
5151
var state = new BlockValidationState();
52-
52+
5353
state.Dispose();
5454
state.Dispose(); // Should not throw
5555
}
@@ -59,7 +59,7 @@ public void AccessAfterDispose_ShouldThrowObjectDisposedException()
5959
{
6060
var state = new BlockValidationState();
6161
state.Dispose();
62-
62+
6363
Assert.Throws<ObjectDisposedException>(() => state.ValidationMode);
6464
}
6565

@@ -68,7 +68,7 @@ public void Copy_AfterDispose_ShouldThrowObjectDisposedException()
6868
{
6969
var state = new BlockValidationState();
7070
state.Dispose();
71-
71+
7272
Assert.Throws<ObjectDisposedException>(() => state.Copy());
7373
}
7474

@@ -77,7 +77,7 @@ public void ValidationResult_AfterDispose_ShouldThrowObjectDisposedException()
7777
{
7878
var state = new BlockValidationState();
7979
state.Dispose();
80-
80+
8181
Assert.Throws<ObjectDisposedException>(() => state.ValidationResult);
8282
}
8383
}

tests/BitcoinKernel.Core.Tests/ScriptVerificationTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ public void ScriptVerifyTest_NativeSegwitTransaction_InvalidSegwit()
9393
18393430, 0, expectSuccess: false);
9494
}
9595

96+
[Fact]
97+
public void ScriptVerifyTest_TaprootTransaction()
98+
{
99+
VerifyTest(
100+
"5120339ce7e165e67d93adb3fef88a6d4beed33f01fa876f05a225242b82a631abc0",
101+
"01000000000101d1f1c1f8cdf6759167b90f52c9ad358a369f95284e841d7a2536cef31c0549580100000000fdffffff020000000000000000316a2f49206c696b65205363686e6f7272207369677320616e6420492063616e6e6f74206c69652e204062697462756734329e06010000000000225120a37c3903c8d0db6512e2b40b0dffa05e5a3ab73603ce8c9c4b7771e5412328f90140a60c383f71bac0ec919b1d7dbc3eb72dd56e7aa99583615564f9f99b8ae4e837b758773a5b2e4c51348854c8389f008e05029db7f464a5ff2e01d5e6e626174affd30a00",
102+
88480, 0, expectSuccess: true);
103+
}
104+
105+
106+
96107
private void VerifyTest(string scriptPubkeyHex, string transactionHex, long amount, int inputIndex, bool expectSuccess)
97108
{
98109
// Create array of spent output hex strings (all the same for this test)

0 commit comments

Comments
 (0)