Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: update addr prefix for defichain #7

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bitcoin/src/blockdata/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ pub const WITNESS_SCALE_FACTOR: usize = 4;
/// The maximum allowed number of signature check operations in a block.
pub const MAX_BLOCK_SIGOPS_COST: i64 = 80_000;
/// Mainnet (bitcoin) pubkey address prefix.
pub const PUBKEY_ADDRESS_PREFIX_MAIN: u8 = 0; // 0x00
// pub const PUBKEY_ADDRESS_PREFIX_MAIN: u8 = 0; // 0x00
pub const PUBKEY_ADDRESS_PREFIX_MAIN: u8 = 18; // 0x12 (defichain)
/// Mainnet (bitcoin) script address prefix.
pub const SCRIPT_ADDRESS_PREFIX_MAIN: u8 = 5; // 0x05
// pub const SCRIPT_ADDRESS_PREFIX_MAIN: u8 = 5; // 0x05
pub const SCRIPT_ADDRESS_PREFIX_MAIN: u8 = 90; // 0x5a (defichain)
/// Test (tesnet, signet, regtest) pubkey address prefix.
pub const PUBKEY_ADDRESS_PREFIX_TEST: u8 = 111; // 0x6f
// pub const PUBKEY_ADDRESS_PREFIX_TEST: u8 = 111; // 0x6f
pub const PUBKEY_ADDRESS_PREFIX_TEST: u8 = 15; // 0xf (defichain)
/// Test (tesnet, signet, regtest) script address prefix.
pub const SCRIPT_ADDRESS_PREFIX_TEST: u8 = 196; // 0xc4
// pub const SCRIPT_ADDRESS_PREFIX_TEST: u8 = 196; // 0xc4
pub const SCRIPT_ADDRESS_PREFIX_TEST: u8 = 128; // 0x80 (defichain)
/// The maximum allowed script size.
pub const MAX_SCRIPT_ELEMENT_SIZE: usize = 520;
/// How may blocks between halvings.
Expand Down
Loading