mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Merge spec crate into types
This commit is contained in:
@@ -14,6 +14,5 @@ failure_derive = "0.1"
|
||||
genesis = { path = "../../eth2/genesis" }
|
||||
serde_derive = "1.0"
|
||||
slot_clock = { path = "../../eth2/utils/slot_clock" }
|
||||
spec = { path = "../../eth2/spec" }
|
||||
ssz = { path = "../../eth2/utils/ssz" }
|
||||
types = { path = "../../eth2/types" }
|
||||
|
||||
@@ -16,10 +16,9 @@ use db::{
|
||||
};
|
||||
use genesis::{genesis_beacon_block, genesis_beacon_state, GenesisError};
|
||||
use slot_clock::SlotClock;
|
||||
use spec::ChainSpec;
|
||||
use ssz::ssz_encode;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use types::{BeaconBlock, BeaconState, Hash256};
|
||||
use types::{BeaconBlock, BeaconState, ChainSpec, Hash256};
|
||||
|
||||
pub use self::block_processing::Outcome as BlockProcessingOutcome;
|
||||
|
||||
|
||||
@@ -430,19 +430,19 @@ fn get_domain(_fork: &Fork, _slot: u64, _domain_type: u64) -> u64 {
|
||||
0
|
||||
}
|
||||
|
||||
fn bls_verify(_pubkey: &PublicKey, _message: &[u8], _signature: &Signature, _domain: u64) -> bool {
|
||||
// TODO: stubbed out.
|
||||
true
|
||||
fn bls_verify(pubkey: &PublicKey, message: &[u8], signature: &Signature, _domain: u64) -> bool {
|
||||
// TODO: add domain
|
||||
signature.verify(message, pubkey)
|
||||
}
|
||||
|
||||
fn bls_verify_aggregate(
|
||||
_pubkey: &AggregatePublicKey,
|
||||
_message: &[u8],
|
||||
_signature: &AggregateSignature,
|
||||
pubkey: &AggregatePublicKey,
|
||||
message: &[u8],
|
||||
signature: &AggregateSignature,
|
||||
_domain: u64,
|
||||
) -> bool {
|
||||
// TODO: stubbed out.
|
||||
true
|
||||
// TODO: add domain
|
||||
signature.verify(message, pubkey)
|
||||
}
|
||||
|
||||
fn hash_tree_root<T>(_input: &T) -> Hash256 {
|
||||
|
||||
@@ -7,9 +7,8 @@ use db::{
|
||||
MemoryDB,
|
||||
};
|
||||
use slot_clock::TestingSlotClock;
|
||||
use spec::ChainSpec;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use types::{Keypair, Validator};
|
||||
use types::{ChainSpec, Keypair, Validator};
|
||||
|
||||
mod utils;
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
use super::{DirectBeaconNode, DirectDuties, TestValidator};
|
||||
use super::TestValidator;
|
||||
use beacon_chain::BeaconChain;
|
||||
#[cfg(test)]
|
||||
use block_producer::{test_utils::TestSigner, BlockProducer};
|
||||
use db::{
|
||||
stores::{BeaconBlockStore, BeaconStateStore},
|
||||
MemoryDB,
|
||||
};
|
||||
use slot_clock::TestingSlotClock;
|
||||
use spec::ChainSpec;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use types::{Keypair, Validator};
|
||||
use std::sync::Arc;
|
||||
use types::{ChainSpec, Keypair, Validator};
|
||||
|
||||
pub struct TestRig {
|
||||
db: Arc<MemoryDB>,
|
||||
|
||||
@@ -4,9 +4,8 @@ use beacon_chain::BeaconChain;
|
||||
use block_producer::{test_utils::TestSigner, BlockProducer, Error as PollError};
|
||||
use db::MemoryDB;
|
||||
use slot_clock::TestingSlotClock;
|
||||
use spec::ChainSpec;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use types::{Keypair, Validator};
|
||||
use std::sync::Arc;
|
||||
use types::{ChainSpec, Keypair};
|
||||
|
||||
pub use block_producer::PollOutcome;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user