Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Forbid all txns and reset block number to 21306000 on barnard
  • Loading branch information
sanlee42 committed Mar 7, 2024
1 parent 8e7d414 commit 5a6816c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions chain/open-block/src/lib.rs
Expand Up @@ -23,7 +23,6 @@ use starcoin_types::{
},
U256,
};
use std::str::FromStr;
use std::{convert::TryInto, sync::Arc};

pub struct OpenedBlock {
Expand Down Expand Up @@ -297,14 +296,15 @@ impl OpenedBlock {
}
}
pub struct AddressFilter;
static BLACKLIST: [&str; 0] = [];
//static BLACKLIST: [&str; 0] = [];
impl AddressFilter {
const ACTIVATION_BLOCK_NUMBER: BlockNumber = 16801958;
pub fn is_blacklisted(raw_txn: &SignedUserTransaction, block_number: BlockNumber) -> bool {
const ACTIVATION_BLOCK_NUMBER: BlockNumber = 21306000;
pub fn is_blacklisted(_raw_txn: &SignedUserTransaction, block_number: BlockNumber) -> bool {
block_number > Self::ACTIVATION_BLOCK_NUMBER
&& BLACKLIST
.iter()
.map(|&s| AccountAddress::from_str(s).expect("account address decode must success"))
.any(|x| x == raw_txn.sender())
/*&& BLACKLIST
.iter()
.map(|&s| AccountAddress::from_str(s).expect("account address decode must success"))
.any(|x| x == raw_txn.sender())
*/
}
}
4 changes: 2 additions & 2 deletions storage/src/upgrade.rs
Expand Up @@ -22,10 +22,10 @@ use std::cmp::Ordering;

pub struct DBUpgrade;

pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 16057420;
pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 21306000;
pub static BARNARD_HARD_FORK_HASH: Lazy<HashValue> = Lazy::new(|| {
HashValue::from_hex_literal(
"0x602bb269e3a221510f82b0b812304e767457f73ac3203663bd401ef3d29bcc97",
"0x3ba2430287c538668c2a3d96a98b57c1ec843f48b5a4e870149ec6289b80413b",
)
.expect("")
});
Expand Down

0 comments on commit 5a6816c

Please sign in to comment.