Skip to content

Commit 00891bb

Browse files
committed
temp
1 parent 1398e6b commit 00891bb

38 files changed

+468
-81
lines changed

Libplanet.Action.Tests/ActionContextTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public ActionContextTest()
3535
hash,
3636
DateTimeOffset.UtcNow,
3737
key.PublicKey,
38+
1,
3839
VoteFlag.PreCommit).Sign(key),
3940
}.ToImmutableArray());
4041
}

Libplanet.Action.Tests/ActionEvaluationTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void Constructor()
4646
hash,
4747
DateTimeOffset.UtcNow,
4848
key.PublicKey,
49+
1,
4950
VoteFlag.PreCommit).Sign(key),
5051
}.ToImmutableArray());
5152
IWorld world = new World(new MockWorldState());

Libplanet.Action.Tests/Sys/InitializeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public void ExecuteInNonGenesis()
9191
hash,
9292
DateTimeOffset.UtcNow,
9393
key.PublicKey,
94+
1,
9495
VoteFlag.PreCommit).Sign(key),
9596
}.ToImmutableArray());
9697
var context = new ActionContext(

Libplanet.Benchmarks/Commit.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ private void SetupVotes()
6565
_blockHash,
6666
DateTimeOffset.UtcNow,
6767
_privateKeys[x].PublicKey,
68+
1,
6869
VoteFlag.PreCommit).Sign(_privateKeys[x]))
6970
.ToArray();
7071
}

Libplanet.Explorer.Tests/GeneratedBlockChainFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ private void AddBlock(ImmutableArray<Transaction> transactions)
196196
block.Hash,
197197
DateTimeOffset.UtcNow,
198198
pk.PublicKey,
199+
1,
199200
VoteFlag.PreCommit).Sign(pk)).ToImmutableArray()));
200201
MinedBlocks = MinedBlocks
201202
.SetItem(

Libplanet.Explorer.Tests/GraphTypes/BlockCommitTypeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public async void Query()
2828
blockHash,
2929
DateTimeOffset.Now,
3030
privateKey.PublicKey,
31+
1,
3132
VoteFlag.PreCommit).Sign(privateKey);
3233
var blockCommit = new BlockCommit(1, 0, blockHash, ImmutableArray.Create(vote));
3334

Libplanet.Explorer.Tests/GraphTypes/BlockTypeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public async void Query()
3131
lastBlockHash,
3232
DateTimeOffset.Now,
3333
privateKey.PublicKey,
34+
1,
3435
VoteFlag.PreCommit).Sign(privateKey));
3536
var lastBlockCommit = new BlockCommit(1, 0, lastBlockHash, lastVotes);
3637
var preEval = new BlockContent(

Libplanet.Explorer.Tests/GraphTypes/VoteTypeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public async void Query()
2727
blockHash,
2828
DateTimeOffset.Now,
2929
privateKey.PublicKey,
30+
1,
3031
VoteFlag.PreCommit).Sign(privateKey);
3132

3233
var query =

Libplanet.Explorer.Tests/Indexing/BlockChainIndexTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ await index.SynchronizeAsync(
5757
divergentBlock.Hash,
5858
DateTimeOffset.UtcNow,
5959
pk.PublicKey,
60+
1,
6061
VoteFlag.PreCommit)
6162
.Sign(pk))
6263
.ToImmutableArray()));

Libplanet.Net.Tests/Consensus/ConsensusContextNonProposerTest.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Immutable;
33
using System.Linq;
4+
using System.Numerics;
45
using Bencodex;
56
using Bencodex.Types;
67
using Libplanet.Crypto;
@@ -72,6 +73,7 @@ public async void NewHeightWithLastCommit()
7273
block1.Hash,
7374
DateTimeOffset.UtcNow,
7475
TestUtils.ValidatorSet[i].PublicKey,
76+
TestUtils.ValidatorSet[i].Power,
7577
VoteFlag.PreVote).Sign(TestUtils.PrivateKeys[i]);
7678
consensusContext.HandleMessage(new ConsensusPreVoteMsg(expectedVotes[i]));
7779
}
@@ -86,6 +88,7 @@ public async void NewHeightWithLastCommit()
8688
block1.Hash,
8789
DateTimeOffset.UtcNow,
8890
TestUtils.ValidatorSet[i].PublicKey,
91+
TestUtils.ValidatorSet[i].Power,
8992
VoteFlag.PreCommit).Sign(TestUtils.PrivateKeys[i]);
9093
consensusContext.HandleMessage(new ConsensusPreCommitMsg(expectedVotes[i]));
9194
}
@@ -174,9 +177,9 @@ public async void HandleMessageFromHigherHeight()
174177
throw new Exception("Proposal is null.");
175178
}
176179

177-
foreach ((PrivateKey privateKey, BoundPeer peer)
180+
foreach ((PrivateKey privateKey, BigInteger power)
178181
in TestUtils.PrivateKeys.Zip(
179-
TestUtils.Peers,
182+
TestUtils.ValidatorSet.Validators.Select(v => v.Power),
180183
(first, second) => (first, second)))
181184
{
182185
if (privateKey == TestUtils.PrivateKeys[2])
@@ -193,12 +196,13 @@ in TestUtils.PrivateKeys.Zip(
193196
proposal!.BlockHash,
194197
DateTimeOffset.UtcNow,
195198
privateKey.PublicKey,
199+
power,
196200
VoteFlag.PreVote).Sign(privateKey)));
197201
}
198202

199-
foreach ((PrivateKey privateKey, BoundPeer peer)
203+
foreach ((PrivateKey privateKey, BigInteger power)
200204
in TestUtils.PrivateKeys.Zip(
201-
TestUtils.Peers,
205+
TestUtils.ValidatorSet.Validators.Select(v => v.Power),
202206
(first, second) => (first, second)))
203207
{
204208
if (privateKey == TestUtils.PrivateKeys[2])
@@ -215,6 +219,7 @@ in TestUtils.PrivateKeys.Zip(
215219
proposal!.BlockHash,
216220
DateTimeOffset.UtcNow,
217221
privateKey.PublicKey,
222+
power,
218223
VoteFlag.PreCommit).Sign(privateKey)));
219224
}
220225

0 commit comments

Comments
 (0)