Skip to content

Commit

Permalink
chore: fix test and exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Nov 16, 2023
1 parent ee89f52 commit 8e0dc6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libplanet.Tests/Blockchain/BlockChainTest.ProposeBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void CanProposeInvalidGenesisBlock()
[SkippableFact]
public void CanProposeInvalidBlock()
{
using (var fx = new MemoryStoreFixture())
using (var fx = new MemoryStoreFixture(_policy.BlockAction))
{
var blockChain = BlockChain.Create(
_policy,
Expand Down
5 changes: 3 additions & 2 deletions Libplanet/Blockchain/BlockChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ public static BlockChain Create(
if (!genesisBlock.StateRootHash.Equals(computedStateRootHash))
{
throw new InvalidBlockStateRootHashException(
"Given block #{Index} {Hash} has a state root hash {ExpectedStateRootHash} " +
"that is different from the calculated state root hash {ActualStateRootHash}",
$"Given block #{preEval.Index} {preEval.PreEvaluationHash} has " +
$"a state root hash {genesisBlock.StateRootHash} that is " +
$"different from the calculated state root hash {computedStateRootHash}",
genesisBlock.StateRootHash,
computedStateRootHash);
}
Expand Down

0 comments on commit 8e0dc6b

Please sign in to comment.