mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
core: fix unnecessary conversion (#1565)
This commit is contained in:
parent
6c2315f9a5
commit
2b658e7934
4 changed files with 5 additions and 5 deletions
|
|
@ -291,7 +291,7 @@ func (w *wizard) makeGenesis() {
|
|||
fmt.Println()
|
||||
fmt.Println("How many blocks before checkpoint need to prepare new set of masternodes? (default = 450)")
|
||||
if input != nil {
|
||||
genesis.Config.XDPoS.Gap = uint64(input.Gap)
|
||||
genesis.Config.XDPoS.Gap = input.Gap
|
||||
} else {
|
||||
genesis.Config.XDPoS.Gap = uint64(w.readDefaultInt(450))
|
||||
}
|
||||
|
|
@ -314,7 +314,7 @@ func (w *wizard) makeGenesis() {
|
|||
} else {
|
||||
yield = uint64(w.readDefaultInt(10))
|
||||
}
|
||||
blocksPerYear := uint64(31536000 / genesis.Config.XDPoS.Period)
|
||||
blocksPerYear := 31536000 / genesis.Config.XDPoS.Period
|
||||
epochsPerYear := blocksPerYear / genesis.Config.XDPoS.Epoch
|
||||
rewardsPerYear := float64(threshold) * (float64(yield) / float64(100))
|
||||
rewardPerEpochPerMN := uint64(rewardsPerYear / float64(epochsPerYear))
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ func testFork(t *testing.T, blockchain *BlockChain, i, n int, full bool, compara
|
|||
|
||||
func printChain(bc *BlockChain) {
|
||||
for i := bc.CurrentBlock().Number().Uint64(); i > 0; i-- {
|
||||
b := bc.GetBlockByNumber(uint64(i))
|
||||
b := bc.GetBlockByNumber(i)
|
||||
fmt.Printf("\t%x %v\n", b.Hash(), b.Difficulty())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ func getLendingNonce(userAddress common.Address) (uint64, error) {
|
|||
s := result.(string)
|
||||
s = strings.TrimPrefix(s, "0x")
|
||||
n, err := strconv.ParseUint(s, 16, 32)
|
||||
return uint64(n), err
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (l *LendingMsg) computeHash() common.Hash {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func getNonce(t *testing.T, userAddress common.Address) (uint64, error) {
|
|||
s := result.(string)
|
||||
s = strings.TrimPrefix(s, "0x")
|
||||
n, err := strconv.ParseUint(s, 16, 32)
|
||||
return uint64(n), err
|
||||
return n, err
|
||||
}
|
||||
func testSendOrder(t *testing.T, amount, price *big.Int, side string, status string, orderID uint64) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue