Skip to content

Commit 8b17e62

Browse files
committed
x
1 parent cc4bc9a commit 8b17e62

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

action/protocol/staking/candidate_buckets_indexer.go

-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ package staking
88

99
import (
1010
"context"
11-
"encoding/hex"
12-
"fmt"
1311
"math/big"
1412

1513
"github.com/iotexproject/iotex-address/address"
@@ -181,15 +179,13 @@ func (cbi *CandidatesBucketsIndexer) GetBuckets(height uint64, offset, limit uin
181179
func (cbi *CandidatesBucketsIndexer) PutStakingBalance(height uint64, total *totalAmount) error {
182180
hei := byteutil.Uint64ToBytesBigEndian(height - 1)
183181
historyKey := append(bucketPoolAddrKey, hei...)
184-
fmt.Println("PutStakingBalance", height, []byte(StakingBucketsNamespace), hex.EncodeToString(historyKey), total.amount)
185182
return cbi.kvStore.Put(StakingBucketsNamespace, historyKey, total.amount.Bytes())
186183
}
187184

188185
// GetStakingBalance gets staking balance
189186
func (cbi *CandidatesBucketsIndexer) GetStakingBalance(height uint64) (*iotextypes.AccountMeta, uint64, error) {
190187
hei := byteutil.Uint64ToBytesBigEndian(height)
191188
historyKey := append(bucketPoolAddrKey, hei...)
192-
fmt.Println("GetStakingBalance", height, []byte(StakingBucketsNamespace), hex.EncodeToString(historyKey))
193189
balanceBytes, err := cbi.kvStore.Get(StakingBucketsNamespace, historyKey)
194190
if err != nil {
195191
return nil, 0, err

action/protocol/staking/protocol.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package staking
88

99
import (
1010
"context"
11-
"fmt"
1211
"math/big"
1312
"time"
1413

@@ -243,10 +242,8 @@ func (p *Protocol) CreatePreStates(ctx context.Context, sm protocol.StateManager
243242
if p.candBucketsIndexer == nil {
244243
return nil
245244
}
246-
fmt.Println("CreatePreStates///////", blkCtx.BlockHeight, p.hu.FairbankBlockHeight(), p.hu.GreenlandBlockHeight())
247-
if p.archiveMode && blkCtx.BlockHeight <= p.hu.GreenlandBlockHeight() && blkCtx.BlockHeight > 1 {
245+
if p.archiveMode && blkCtx.BlockHeight <= p.hu.GreenlandBlockHeight() {
248246
if err := p.saveStakingAddressHistory(blkCtx.BlockHeight, sm); err != nil {
249-
fmt.Println("saveStakingAddressHistory errrrr", err)
250247
return err
251248
}
252249
}
@@ -269,7 +266,6 @@ func (p *Protocol) saveStakingAddressHistory(height uint64, sm protocol.StateMan
269266
return err
270267
}
271268
balance := csr.BaseView().bucketPool.total
272-
fmt.Println("saveStakingAddressHistory1", height, balance.amount)
273269
if balance.amount.Sign() <= 0 {
274270
return nil
275271
}

0 commit comments

Comments
 (0)