Skip to content

Commit 5eb1cf1

Browse files
committed
[stream] added a signature in ChainReader to fix the build error
1 parent 3977ac4 commit 5eb1cf1

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

consensus/engine/consensus_engine.go

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ type ChainReader interface {
6565
SuperCommitteeForNextEpoch(
6666
beacon ChainReader, header *block.Header, isVerify bool,
6767
) (*shard.State, error)
68+
69+
// ReadCommitSig read the commit sig of a given block number
70+
ReadCommitSig(blockNum uint64) ([]byte, error)
6871
}
6972

7073
// Engine is an algorithm agnostic consensus engine.

core/chain_makers.go

+2
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,5 @@ func (cr *fakeChainReader) ReadValidatorStats(
305305
) (*staking.ValidatorStats, error) {
306306
return nil, nil
307307
}
308+
309+
func (cr *fakeChainReader) ReadCommitSig(blockNum uint64) ([]byte, error) { return nil, nil }

p2p/stream/protocols/sync/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func makeTestProtocol(f getResponseFn) *Protocol {
371371
copy(streamIDs, initStreamIDs)
372372
sm := &testStreamManager{streamIDs}
373373

374-
rl := ratelimiter.NewRateLimiter(10, 10)
374+
rl := ratelimiter.NewRateLimiter(sm, 10, 10)
375375

376376
return &Protocol{
377377
rm: rm,

p2p/stream/protocols/sync/message/msg.pb.go

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)