Skip to content

Commit

Permalink
revert RawBlockHeader author_auth_key for compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Dec 13, 2024
1 parent ba0c92b commit 74b510b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/nextest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cargo nextest -V >/dev/null 2>&1 || cargo install cargo-nextest --version "0.9.5
# --retries 2, a correct test case usually takes no more than 3 tries to pass
# --build-jobs 8, a little (~20s) faster than 5 or 10 build jobs
cargo nextest run --workspace \
--exclude starcoin-consensus \
-E 'not (test(block_connector::test_write_dag_block_chain::test_block_dag_chain_switch_main)) and not (test(block_connector::test_write_dag_block_chain::test_full_sync_continue)) and not (test(tasks::tests::test_full_sync_continue)) and not (test(tasks::tests::test_full_sync_fork)) and not (test(tasks::tests::test_full_sync_fork_from_genesis)) and not (test(tasks::tests::test_full_sync_new_node)) and not (test(tasks::tests::test_sync_block_in_async_connection)) and not (test(tasks::tests_dag::test_continue_sync_dag_blocks)) and not (test(tasks::tests_dag::test_sync_dag_blocks)) and not (test(test_sync_and_notification)) and not (test(block_connector::test_write_dag_block_chain::test_block_dag_chain_switch_main)) and not (test(block_connector::test_illegal_block::test_verify_consensus_failed)) and not (test(tasks::tests::test_full_sync_cancel))'
--retries 2 --build-jobs 8 --test-threads 12 --no-fail-fast --failure-output immediate-final

Expand Down
6 changes: 6 additions & 0 deletions types/src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use starcoin_vm_types::account_config::genesis_address;
use std::fmt::Formatter;
use std::hash::Hash;
use std::sync::Mutex;
use starcoin_vm_types::transaction::authenticator::AuthenticationKey;

/// Type for block number.
pub type BlockNumber = u64;
Expand Down Expand Up @@ -545,6 +546,7 @@ impl Into<RawBlockHeader> for BlockHeader {
timestamp: self.timestamp,
number: self.number,
author: self.author,
author_auth_key: None,
accumulator_root: self.txn_accumulator_root,
parent_block_accumulator_root: self.block_accumulator_root,
state_root: self.state_root,
Expand All @@ -566,6 +568,9 @@ pub struct RawBlockHeader {
pub number: BlockNumber,
/// Block author.
pub author: AccountAddress,
/// Block author auth key.
/// this field is deprecated
pub author_auth_key: Option<AuthenticationKey>,
/// The transaction accumulator root hash after executing this block.
pub accumulator_root: HashValue,
/// The parent block accumulator root hash.
Expand Down Expand Up @@ -1039,6 +1044,7 @@ impl BlockTemplate {
timestamp: self.timestamp,
number: self.number,
author: self.author,
author_auth_key: None,
accumulator_root: self.txn_accumulator_root,
parent_block_accumulator_root: self.block_accumulator_root,
state_root: self.state_root,
Expand Down

0 comments on commit 74b510b

Please sign in to comment.