mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 05:18:30 +00:00
Squashed changed from modularized-validator-store
This commit is contained in:
@@ -46,7 +46,7 @@ mod tests {
|
||||
use tokio::time::sleep;
|
||||
use types::{attestation::AttestationBase, *};
|
||||
use url::Url;
|
||||
use validator_store::{Error as ValidatorStoreError, SignBlock, ValidatorStore};
|
||||
use validator_store::{Error as ValidatorStoreError, SignedBlock, ValidatorStore};
|
||||
|
||||
/// If the we are unable to reach the Web3Signer HTTP API within this time out then we will
|
||||
/// assume it failed to start.
|
||||
@@ -75,6 +75,7 @@ mod tests {
|
||||
impl SignedObject for Signature {}
|
||||
impl SignedObject for Attestation<E> {}
|
||||
impl SignedObject for SignedBeaconBlock<E> {}
|
||||
impl SignedObject for SignedBlock<E> {}
|
||||
impl SignedObject for SignedAggregateAndProof<E> {}
|
||||
impl SignedObject for SelectionProof {}
|
||||
impl SignedObject for SyncSelectionProof {}
|
||||
@@ -599,10 +600,10 @@ mod tests {
|
||||
.assert_signatures_match("beacon_block_base", |pubkey, validator_store| {
|
||||
let spec = spec.clone();
|
||||
async move {
|
||||
let block = BeaconBlock::Base(BeaconBlockBase::empty(&spec));
|
||||
let block = BeaconBlock::<E>::Base(BeaconBlockBase::empty(&spec));
|
||||
let block_slot = block.slot();
|
||||
validator_store
|
||||
.sign_block(pubkey, block, block_slot)
|
||||
.sign_block(pubkey, block.into(), block_slot)
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
@@ -669,10 +670,14 @@ mod tests {
|
||||
.assert_signatures_match("beacon_block_altair", |pubkey, validator_store| {
|
||||
let spec = spec.clone();
|
||||
async move {
|
||||
let mut altair_block = BeaconBlockAltair::empty(&spec);
|
||||
let mut altair_block = BeaconBlockAltair::<E>::empty(&spec);
|
||||
altair_block.slot = altair_fork_slot;
|
||||
validator_store
|
||||
.sign_block(pubkey, BeaconBlock::Altair(altair_block), altair_fork_slot)
|
||||
.sign_block(
|
||||
pubkey,
|
||||
BeaconBlock::Altair(altair_block).into(),
|
||||
altair_fork_slot,
|
||||
)
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
@@ -752,12 +757,12 @@ mod tests {
|
||||
.assert_signatures_match("beacon_block_bellatrix", |pubkey, validator_store| {
|
||||
let spec = spec.clone();
|
||||
async move {
|
||||
let mut bellatrix_block = BeaconBlockBellatrix::empty(&spec);
|
||||
let mut bellatrix_block = BeaconBlockBellatrix::<E>::empty(&spec);
|
||||
bellatrix_block.slot = bellatrix_fork_slot;
|
||||
validator_store
|
||||
.sign_block(
|
||||
pubkey,
|
||||
BeaconBlock::Bellatrix(bellatrix_block),
|
||||
BeaconBlock::Bellatrix(bellatrix_block).into(),
|
||||
bellatrix_fork_slot,
|
||||
)
|
||||
.await
|
||||
@@ -813,7 +818,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let first_block = || {
|
||||
let mut bellatrix_block = BeaconBlockBellatrix::empty(&spec);
|
||||
let mut bellatrix_block = BeaconBlockBellatrix::<E>::empty(&spec);
|
||||
bellatrix_block.slot = bellatrix_fork_slot;
|
||||
BeaconBlock::Bellatrix(bellatrix_block)
|
||||
};
|
||||
@@ -879,7 +884,7 @@ mod tests {
|
||||
let block = first_block();
|
||||
let slot = block.slot();
|
||||
validator_store
|
||||
.sign_block(pubkey, block, slot)
|
||||
.sign_block(pubkey, block.into(), slot)
|
||||
.await
|
||||
.unwrap()
|
||||
})
|
||||
@@ -890,7 +895,7 @@ mod tests {
|
||||
let block = double_vote_block();
|
||||
let slot = block.slot();
|
||||
validator_store
|
||||
.sign_block(pubkey, block, slot)
|
||||
.sign_block(pubkey, block.into(), slot)
|
||||
.await
|
||||
.map(|_| ())
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user