Skip to content
Snippets Groups Projects
Commit ab39d740 authored by Éloïs's avatar Éloïs Committed by Éloïs
Browse files

[fix] passBlockDocument fields in public

parent 4bca71ef
No related branches found
No related tags found
No related merge requests found
...@@ -81,64 +81,64 @@ pub struct BlockParameters { ...@@ -81,64 +81,64 @@ pub struct BlockParameters {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct BlockDocument { pub struct BlockDocument {
/// Nonce /// Nonce
nonce: u64, pub nonce: u64,
/// number /// number
number: BlockId, pub number: BlockId,
/// Minimal proof of work difficulty /// Minimal proof of work difficulty
pow_min: usize, pub pow_min: usize,
/// Local time of the block issuer /// Local time of the block issuer
time: u64, pub time: u64,
/// Average time /// Average time
median_time: u64, pub median_time: u64,
/// Members count /// Members count
members_count: usize, pub members_count: usize,
/// Monetary mass /// Monetary mass
monetary_mass: usize, pub monetary_mass: usize,
/// Unit base (power of ten) /// Unit base (power of ten)
unit_base: usize, pub unit_base: usize,
/// Number of compute members in the current frame /// Number of compute members in the current frame
issuers_count: usize, pub issuers_count: usize,
/// Current frame size (in blocks) /// Current frame size (in blocks)
issuers_frame: isize, pub issuers_frame: isize,
/// Current frame variation buffer /// Current frame variation buffer
issuers_frame_var: isize, pub issuers_frame_var: isize,
/// Currency. /// Currency.
currency: String, pub currency: String,
/// Document issuer (there should be only one). /// Document issuer (there should be only one).
issuers: Vec<ed25519::PublicKey>, pub issuers: Vec<ed25519::PublicKey>,
/// Document signature (there should be only one). /// Document signature (there should be only one).
/// This vector is empty, when the block is generated but the proof of work has not yet started /// This vector is empty, when the block is generated but the proof of work has not yet started
signatures: Vec<ed25519::Signature>, pub signatures: Vec<ed25519::Signature>,
/// The hash is None, when the block is generated but the proof of work has not yet started /// The hash is None, when the block is generated but the proof of work has not yet started
hash: Option<BlockHash>, pub hash: Option<BlockHash>,
/// Currency parameters (only in genesis block) /// Currency parameters (only in genesis block)
parameters: Option<BlockParameters>, pub parameters: Option<BlockParameters>,
/// Hash of the previous block /// Hash of the previous block
previous_hash: Option<Hash>, pub previous_hash: Option<Hash>,
/// Issuer of the previous block /// Issuer of the previous block
previous_issuer: Option<ed25519::PublicKey>, pub previous_issuer: Option<ed25519::PublicKey>,
/// Hash of the deterministic content of the block /// Hash of the deterministic content of the block
inner_hash: Option<Hash>, pub inner_hash: Option<Hash>,
/// Amount of new dividend created at this block, None if no dividend is created at this block /// Amount of new dividend created at this block, None if no dividend is created at this block
dividend: Option<usize>, pub dividend: Option<usize>,
/// Identities /// Identities
identities: Vec<IdentityDocument>, pub identities: Vec<IdentityDocument>,
/// joiners /// joiners
joiners: Vec<MembershipDocument>, pub joiners: Vec<MembershipDocument>,
/// Actives (=renewals) /// Actives (=renewals)
actives: Vec<MembershipDocument>, pub actives: Vec<MembershipDocument>,
/// Leavers /// Leavers
leavers: Vec<MembershipDocument>, pub leavers: Vec<MembershipDocument>,
/// Revokeds /// Revokeds
revoked: Vec<RevocationDocument>, pub revoked: Vec<RevocationDocument>,
/// Excludeds /// Excludeds
excluded: Vec<ed25519::PublicKey>, pub excluded: Vec<ed25519::PublicKey>,
/// Certifications /// Certifications
certifications: Vec<CertificationDocument>, pub certifications: Vec<CertificationDocument>,
/// Transactions /// Transactions
transactions: Vec<TransactionDocument>, pub transactions: Vec<TransactionDocument>,
/// Part to sign /// Part to sign
inner_hash_and_nonce_str: String, pub inner_hash_and_nonce_str: String,
} }
impl BlockDocument { impl BlockDocument {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment