From fa3fbacd9f07f2453809eb68e0591145f54745bc Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:56:47 -0800 Subject: [PATCH] nit: reorder items --- ledger/narwhal/batch-certificate/src/lib.rs | 10 +++++----- ledger/narwhal/batch-header/src/lib.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ledger/narwhal/batch-certificate/src/lib.rs b/ledger/narwhal/batch-certificate/src/lib.rs index 5255ee9d26..a99166c383 100644 --- a/ledger/narwhal/batch-certificate/src/lib.rs +++ b/ledger/narwhal/batch-certificate/src/lib.rs @@ -121,6 +121,11 @@ impl BatchCertificate { self.batch_header().round() } + /// Returns the timestamp of the batch header. + pub fn timestamp(&self) -> i64 { + self.batch_header().timestamp() + } + /// Returns the committee ID. pub const fn committee_id(&self) -> Field { self.batch_header().committee_id() @@ -136,11 +141,6 @@ impl BatchCertificate { self.batch_header().previous_certificate_ids() } - /// Returns the timestamp of the batch header. - pub fn timestamp(&self) -> i64 { - self.batch_header().timestamp() - } - /// Returns the signatures of the batch ID from the committee. pub fn signatures(&self) -> Box>> { Box::new(self.signatures.iter()) diff --git a/ledger/narwhal/batch-header/src/lib.rs b/ledger/narwhal/batch-header/src/lib.rs index 9fb680f34a..ce79fc6c6a 100644 --- a/ledger/narwhal/batch-header/src/lib.rs +++ b/ledger/narwhal/batch-header/src/lib.rs @@ -110,8 +110,8 @@ impl BatchHeader { let signature = private_key.sign(&[batch_id], rng)?; // Return the batch header. Ok(Self { - author, batch_id, + author, round, timestamp, committee_id,