fix several warnings and hints
This commit is contained in:
parent
827956b5b3
commit
d8590bbffc
|
@ -1,9 +1,9 @@
|
|||
import
|
||||
# Standard library
|
||||
os, net, tables, random, strutils, times, strformat, memfiles,
|
||||
os, net, tables, random, strutils, times, memfiles,
|
||||
|
||||
# Nimble packages
|
||||
stew/[objects, bitseqs, byteutils], stew/ranges/ptr_arith,
|
||||
stew/[objects, bitseqs], stew/ranges/ptr_arith,
|
||||
chronos, chronicles, confutils, metrics,
|
||||
json_serialization/std/[options, sets], serialization/errors,
|
||||
eth/trie/db, eth/trie/backends/rocksdb_backend, eth/async_utils,
|
||||
|
|
|
@ -45,4 +45,4 @@ proc fetchAncestorBlocks*(requestManager: RequestManager,
|
|||
|
||||
var fetchComplete = false
|
||||
for peer in requestManager.network.randomPeers(ParallelRequests, BeaconSync):
|
||||
traceAsyncErrors peer.fetchAncestorBlocksFromPeer(roots.rand(), responseHandler)
|
||||
traceAsyncErrors peer.fetchAncestorBlocksFromPeer(roots.sample(), responseHandler)
|
||||
|
|
|
@ -63,7 +63,7 @@ proc sendDeposits*(
|
|||
for i, dp in deposits:
|
||||
web3.defaultAccount = eth1Addresses[i]
|
||||
let depositContract = web3.contractSender(DepositContract, contractAddress)
|
||||
let tx = await depositContract.deposit(
|
||||
discard await depositContract.deposit(
|
||||
Bytes48(dp.data.pubKey.getBytes()),
|
||||
Bytes32(dp.data.withdrawal_credentials.data),
|
||||
Bytes96(dp.data.signature.getBytes()),
|
||||
|
|
|
@ -100,9 +100,6 @@ proc mockAttestationImpl(
|
|||
var cache = get_empty_per_epoch_cache()
|
||||
|
||||
let
|
||||
committees_per_slot = get_committee_count_at_slot(
|
||||
state, slot)
|
||||
|
||||
beacon_committee = get_beacon_committee(
|
||||
state,
|
||||
result.data.slot,
|
||||
|
|
|
@ -136,6 +136,7 @@ template mockGenesisDepositsImpl(
|
|||
depositsDataHash.add hash_tree_root(result[valIdx].data)
|
||||
|
||||
# 2nd & 3rd loops - build hashes and proofs
|
||||
when false:
|
||||
let root = hash_tree_root(depositsData)
|
||||
let tree = merkleTreeFromLeaves(depositsDataHash)
|
||||
|
||||
|
@ -209,8 +210,8 @@ proc mockUpdateStateForNewDeposit*(
|
|||
flags
|
||||
)
|
||||
|
||||
let tree = merkleTreeFromLeaves([hash_tree_root(result.data)])
|
||||
when false: # TODO
|
||||
let tree = merkleTreeFromLeaves([hash_tree_root(result.data)])
|
||||
result[valIdx].proof[0..31] = tree.getMerkleProof(0)
|
||||
result[valIdx].proof[32] = int_to_bytes32(0 + 1)
|
||||
# doAssert: verify_merkle_branch(...)
|
||||
|
|
|
@ -62,7 +62,7 @@ suite "Official - Sanity - Blocks " & preset():
|
|||
expect(AssertionError):
|
||||
# assert in process_slots. This should not be triggered
|
||||
# for blocks from block_pool/network
|
||||
let done = state_transition(stateRef[], blck, flags = {skipValidation})
|
||||
discard state_transition(stateRef[], blck, flags = {skipValidation})
|
||||
|
||||
runValidTest("Same slot block transition", same_slot_block_transition, 1)
|
||||
runValidTest("Empty block transition", empty_block_transition, 1)
|
||||
|
@ -77,7 +77,7 @@ suite "Official - Sanity - Blocks " & preset():
|
|||
let blck = parseTest(testDir/"blocks_0.ssz", SSZ, BeaconBlock)
|
||||
|
||||
expect(AssertionError):
|
||||
let done = state_transition(stateRef[], blck, flags = {skipValidation})
|
||||
discard state_transition(stateRef[], blck, flags = {skipValidation})
|
||||
|
||||
runValidTest("Skipped Slots", skipped_slots, 1)
|
||||
runValidTest("Empty epoch transition", empty_epoch_transition, 1)
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest,
|
||||
../beacon_chain/beacon_node
|
||||
import unittest
|
||||
|
||||
when false:
|
||||
import ../beacon_chain/beacon_node
|
||||
|
||||
suite "Beacon node":
|
||||
# Compile test
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
{.used.}
|
||||
|
||||
import
|
||||
unittest,
|
||||
../beacon_chain/sync_protocol
|
||||
import unittest
|
||||
|
||||
when false:
|
||||
import ../beacon_chain/sync_protocol
|
||||
|
||||
suite "Sync protocol":
|
||||
# Compile test
|
||||
|
|
Loading…
Reference in New Issue