From 8c52dffbebd43de3f346917b701bc09285d76266 Mon Sep 17 00:00:00 2001 From: Denis Subbotin Date: Tue, 6 Aug 2024 22:38:44 +0300 Subject: [PATCH] fix calculating master diffs --- pkg/api/blockchain_handlers.go | 2 +- pkg/chainstate/chainstate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/blockchain_handlers.go b/pkg/api/blockchain_handlers.go index c4a027af..7e3a560b 100644 --- a/pkg/api/blockchain_handlers.go +++ b/pkg/api/blockchain_handlers.go @@ -128,7 +128,7 @@ func findMissedBlocks(ctx context.Context, s storage, id ton.BlockID, prev []ton for _, p := range prev { if id.Shard == p.Shard && id.Workchain == p.Workchain { blocks := make([]ton.BlockID, 0, int(id.Seqno-p.Seqno)) - for i := p.Seqno; i < id.Seqno; i++ { + for i := p.Seqno + 1; i <= id.Seqno; i++ { blocks = append(blocks, ton.BlockID{Workchain: p.Workchain, Shard: p.Shard, Seqno: i}) } return blocks, nil diff --git a/pkg/chainstate/chainstate.go b/pkg/chainstate/chainstate.go index bbaa75a3..60d2dcc4 100644 --- a/pkg/chainstate/chainstate.go +++ b/pkg/chainstate/chainstate.go @@ -28,7 +28,7 @@ func (s *ChainState) GetAPY() float64 { } func NewChainState(c config) *ChainState { - chain := &ChainState{apy: 5.4, banned: map[tongo.AccountID]struct{}{}, config: c} + chain := &ChainState{apy: 3.3, banned: map[tongo.AccountID]struct{}{}, config: c} go func() { for {