ints: stricter numbers (#4939)

This commit is contained in:
Marko
2020-06-04 16:34:56 +02:00
committed by GitHub
parent 7c576f02ab
commit a88537bb88
56 changed files with 738 additions and 674 deletions

View File

@@ -276,7 +276,7 @@ func (evpool *Pool) IsPending(evidence types.Evidence) bool {
}
// RetrievePOLC attempts to find a polc at the given height and round, if not there it returns an error
func (evpool *Pool) RetrievePOLC(height int64, round int) (types.ProofOfLockChange, error) {
func (evpool *Pool) RetrievePOLC(height int64, round int32) (types.ProofOfLockChange, error) {
var polc types.ProofOfLockChange
key := keyPOLCFromHeightAndRound(height, round)
polcBytes, err := evpool.evidenceStore.Get(key)
@@ -545,7 +545,7 @@ func keyPOLC(polc types.ProofOfLockChange) []byte {
return keyPOLCFromHeightAndRound(polc.Height(), polc.Round())
}
func keyPOLCFromHeightAndRound(height int64, round int) []byte {
func keyPOLCFromHeightAndRound(height int64, round int32) []byte {
return append([]byte{baseKeyPOLC}, []byte(fmt.Sprintf("%s/%s", bE(height), bE(int64(round))))...)
}