Implement transaction pool basics

This commit is contained in:
Michael Sproul
2019-03-06 14:46:12 +11:00
parent d936bc0e5d
commit 8f4a2fbde1
10 changed files with 377 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ edition = "2018"
bls = { path = "../utils/bls" }
boolean-bitfield = { path = "../utils/boolean-bitfield" }
dirs = "1.0"
derivative = "1.0"
ethereum-types = "0.5"
hashing = { path = "../utils/hashing" }
hex = "0.3"

View File

@@ -1,6 +1,7 @@
use super::Slot;
use crate::test_utils::TestRandom;
use bls::{PublicKey, Signature};
use derivative::Derivative;
use rand::RngCore;
use serde_derive::{Deserialize, Serialize};
use ssz::TreeHash;
@@ -12,7 +13,6 @@ use test_random_derive::TestRandom;
/// Spec v0.5.0
#[derive(
Debug,
PartialEq,
Clone,
Serialize,
Deserialize,
@@ -21,7 +21,9 @@ use test_random_derive::TestRandom;
TreeHash,
TestRandom,
SignedRoot,
Derivative,
)]
#[derivative(PartialEq, Eq, Hash)]
pub struct Transfer {
pub sender: u64,
pub recipient: u64,
@@ -29,6 +31,7 @@ pub struct Transfer {
pub fee: u64,
pub slot: Slot,
pub pubkey: PublicKey,
#[derivative(Hash = "ignore")]
pub signature: Signature,
}