mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
ints: stricter numbers (#4939)
This commit is contained in:
+3
-3
@@ -80,7 +80,7 @@ func (bs *BlockStore) LoadBlock(height int64) *types.Block {
|
||||
|
||||
var block = new(types.Block)
|
||||
buf := []byte{}
|
||||
for i := 0; i < blockMeta.BlockID.PartsHeader.Total; i++ {
|
||||
for i := 0; i < int(blockMeta.BlockID.PartsHeader.Total); i++ {
|
||||
part := bs.LoadBlockPart(height, i)
|
||||
buf = append(buf, part.Bytes...)
|
||||
}
|
||||
@@ -235,7 +235,7 @@ func (bs *BlockStore) PruneBlocks(height int64) (uint64, error) {
|
||||
batch.Delete(calcBlockHashKey(meta.BlockID.Hash))
|
||||
batch.Delete(calcBlockCommitKey(h))
|
||||
batch.Delete(calcSeenCommitKey(h))
|
||||
for p := 0; p < meta.BlockID.PartsHeader.Total; p++ {
|
||||
for p := 0; p < int(meta.BlockID.PartsHeader.Total); p++ {
|
||||
batch.Delete(calcBlockPartKey(h, p))
|
||||
}
|
||||
pruned++
|
||||
@@ -286,7 +286,7 @@ func (bs *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, s
|
||||
bs.db.Set(calcBlockHashKey(hash), []byte(fmt.Sprintf("%d", height)))
|
||||
|
||||
// Save block parts
|
||||
for i := 0; i < blockParts.Total(); i++ {
|
||||
for i := 0; i < int(blockParts.Total()); i++ {
|
||||
part := blockParts.GetPart(i)
|
||||
bs.saveBlockPart(height, i, part)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user