Skip to content

Commit 8c1e3b2

Browse files
committed
v0.4.3.
1 parent cb2c73b commit 8c1e3b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pchain-types"
3-
version = "0.4.2"
3+
version = "0.4.3"
44
authors = ["ParallelChain Lab <[email protected]>"]
55
edition = "2018"
66
description = "Data types defined in the ParallelChain Protocol"

src/cryptography.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub use ed25519_dalek::Verifier;
4949
/// - a contract address.
5050
pub type PublicAddress = [u8; 32];
5151

52-
fn contract_address(signer: &PublicAddress, nonce: u64) -> PublicAddress {
52+
pub fn contract_address(signer: &PublicAddress, nonce: u64) -> PublicAddress {
5353
let mut hasher = Sha256::new();
5454
let mut pre_image = Vec::new();
5555
pre_image.extend(signer);
@@ -70,7 +70,7 @@ pub fn sha256<T: AsRef<[u8]>>(data: T) -> Sha256Hash {
7070
ret.finalize().into()
7171
}
7272

73-
// Compute the Binary Merkle Tree root hash over a list of arbitrary data, e.g., [crate::blockchain::Transaction](transactions) or [crate::blockchain::Receipt](receipts).
73+
/// Compute the Binary Merkle Tree root hash over a list of arbitrary data, e.g., [crate::blockchain::Transaction](transactions) or [crate::blockchain::Receipt](receipts).
7474
pub fn merkle_root<O: AsRef<[I]>, I: AsRef<[u8]>>(data: O) -> Sha256Hash {
7575
// null hash really isn't all 0s. There is no hash value for a tree without root. But here
7676
// we use the 32-byte hash values to fill in the field definition inside data structures, for example, block header.

0 commit comments

Comments
 (0)