type in eth_common has been renamed to avoid a naming collission in nimbus's gas_costs module

This commit is contained in:
Zahary Karadjov 2018-07-23 13:44:56 +03:00
parent 41e92ca8df
commit 6351fc38b9
2 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ type
syncing: bool syncing: bool
PeerState = object PeerState = object
reportedTotalDifficulty: Difficulty reportedTotalDifficulty: DifficultyInt
latestBlockHash: KeccakHash latestBlockHash: KeccakHash
const const
@ -41,7 +41,7 @@ rlpxProtocol eth, 63:
proc status(peer: Peer, proc status(peer: Peer,
protocolVersion, networkId: uint, protocolVersion, networkId: uint,
totalDifficulty: Difficulty, totalDifficulty: DifficultyInt,
bestHash, genesisHash: KeccakHash) = bestHash, genesisHash: KeccakHash) =
# verify that the peer is on the same chain: # verify that the peer is on the same chain:
if peer.network.networkId != networkId or if peer.network.networkId != networkId or
@ -100,7 +100,7 @@ rlpxProtocol eth, 63:
proc blockBodies(peer: Peer, blocks: openarray[BlockBody]) proc blockBodies(peer: Peer, blocks: openarray[BlockBody])
proc newBlock(peer: Peer, bh: NewBlockAnnounce, totalDifficulty: Difficulty) = proc newBlock(peer: Peer, bh: NewBlockAnnounce, totalDifficulty: DifficultyInt) =
discard discard
nextID 13 nextID 13
@ -130,7 +130,7 @@ proc fastBlockchainSync*(node: EthereumNode) {.async.} =
discard await all(requests) discard await all(requests)
# 2. find out what is the block with best total difficulty # 2. find out what is the block with best total difficulty
var bestBlockDifficulty: Difficulty = 0.stuint(256) var bestBlockDifficulty: DifficultyInt = 0.stuint(256)
for req in requests: for req in requests:
if req.read.isNone: continue if req.read.isNone: continue
for header in req.read.get.headers: for header in req.read.get.headers:

View File

@ -50,7 +50,7 @@ type
PeerState = object PeerState = object
buffer: int buffer: int
lastRequestTime: float lastRequestTime: float
reportedTotalDifficulty: Difficulty reportedTotalDifficulty: DifficultyInt
KeyValuePair = object KeyValuePair = object
key: string key: string
@ -132,7 +132,7 @@ rlpxProtocol les, 2:
proc announce(p: Peer, proc announce(p: Peer,
headHash: KeccakHash, headHash: KeccakHash,
headNumber: BlockNumber, headNumber: BlockNumber,
headTotalDifficulty: Difficulty, headTotalDifficulty: DifficultyInt,
reorgDepth: BlockNumber, reorgDepth: BlockNumber,
values: openarray[KeyValuePair], values: openarray[KeyValuePair],
announceType: uint) = announceType: uint) =