-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dag] certified node handler (#8919)
- Loading branch information
1 parent
da278bf
commit 0982a4f
Showing
8 changed files
with
151 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright © Aptos Foundation | ||
|
||
use crate::dag::types::{CertifiedNode, Node, NodeCertificate}; | ||
use aptos_consensus_types::common::{Author, Payload, Round}; | ||
use aptos_types::aggregate_signature::AggregateSignature; | ||
|
||
pub(crate) fn new_certified_node( | ||
round: Round, | ||
author: Author, | ||
parents: Vec<NodeCertificate>, | ||
) -> CertifiedNode { | ||
let node = Node::new(1, round, author, 0, Payload::empty(false), parents); | ||
CertifiedNode::new(node, AggregateSignature::empty()) | ||
} | ||
|
||
pub(crate) fn new_node( | ||
round: Round, | ||
timestamp: u64, | ||
author: Author, | ||
parents: Vec<NodeCertificate>, | ||
) -> Node { | ||
Node::new(0, round, author, timestamp, Payload::empty(false), parents) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
mod dag_test; | ||
mod helpers; | ||
mod reliable_broadcast_tests; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters