Update transaction layout offsets

24 less bytes in minimal transactions. 10% TPS boost?
This commit is contained in:
Greg Fitzgerald
2018-08-24 18:29:12 -07:00
parent 59dd8b650d
commit 60d8f5489f

View File

@ -7,9 +7,9 @@ use hash::Hash;
use payment_plan::{Payment, PaymentPlan, Witness}; use payment_plan::{Payment, PaymentPlan, Witness};
use signature::{Keypair, KeypairUtil, Pubkey, Signature}; use signature::{Keypair, KeypairUtil, Pubkey, Signature};
pub const SIGNED_DATA_OFFSET: usize = 112; pub const SIGNED_DATA_OFFSET: usize = 96;
pub const SIG_OFFSET: usize = 8; pub const SIG_OFFSET: usize = 0;
pub const PUB_KEY_OFFSET: usize = 80; pub const PUB_KEY_OFFSET: usize = 64;
/// The type of payment plan. Each item must implement the PaymentPlan trait. /// The type of payment plan. Each item must implement the PaymentPlan trait.
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]