mirror of
https://github.com/LBRYFoundation/lbcd.git
synced 2025-08-23 17:47:24 +00:00
add Bech32HRPSegwit (human-readable part for segwit addresses) to chaincfg.Params
This commit is contained in:
parent
948d80b198
commit
9822ffad68
1 changed files with 20 additions and 0 deletions
|
@ -195,6 +195,10 @@ type Params struct {
|
||||||
// Mempool parameters
|
// Mempool parameters
|
||||||
RelayNonStdTxs bool
|
RelayNonStdTxs bool
|
||||||
|
|
||||||
|
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||||
|
// BIP 173.
|
||||||
|
Bech32HRPSegwit string
|
||||||
|
|
||||||
// Address encoding magics
|
// Address encoding magics
|
||||||
PubKeyHashAddrID byte // First byte of a P2PKH address
|
PubKeyHashAddrID byte // First byte of a P2PKH address
|
||||||
ScriptHashAddrID byte // First byte of a P2SH address
|
ScriptHashAddrID byte // First byte of a P2SH address
|
||||||
|
@ -284,6 +288,10 @@ var MainNetParams = Params{
|
||||||
// Mempool parameters
|
// Mempool parameters
|
||||||
RelayNonStdTxs: false,
|
RelayNonStdTxs: false,
|
||||||
|
|
||||||
|
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||||
|
// BIP 173.
|
||||||
|
Bech32HRPSegwit: "bc", // always bc for main net
|
||||||
|
|
||||||
// Address encoding magics
|
// Address encoding magics
|
||||||
PubKeyHashAddrID: 0x00, // starts with 1
|
PubKeyHashAddrID: 0x00, // starts with 1
|
||||||
ScriptHashAddrID: 0x05, // starts with 3
|
ScriptHashAddrID: 0x05, // starts with 3
|
||||||
|
@ -349,6 +357,10 @@ var RegressionNetParams = Params{
|
||||||
// Mempool parameters
|
// Mempool parameters
|
||||||
RelayNonStdTxs: true,
|
RelayNonStdTxs: true,
|
||||||
|
|
||||||
|
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||||
|
// BIP 173.
|
||||||
|
Bech32HRPSegwit: "tb", // always tb for test net
|
||||||
|
|
||||||
// Address encoding magics
|
// Address encoding magics
|
||||||
PubKeyHashAddrID: 0x6f, // starts with m or n
|
PubKeyHashAddrID: 0x6f, // starts with m or n
|
||||||
ScriptHashAddrID: 0xc4, // starts with 2
|
ScriptHashAddrID: 0xc4, // starts with 2
|
||||||
|
@ -431,6 +443,10 @@ var TestNet3Params = Params{
|
||||||
// Mempool parameters
|
// Mempool parameters
|
||||||
RelayNonStdTxs: true,
|
RelayNonStdTxs: true,
|
||||||
|
|
||||||
|
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||||
|
// BIP 173.
|
||||||
|
Bech32HRPSegwit: "tb", // always tb for test net
|
||||||
|
|
||||||
// Address encoding magics
|
// Address encoding magics
|
||||||
PubKeyHashAddrID: 0x6f, // starts with m or n
|
PubKeyHashAddrID: 0x6f, // starts with m or n
|
||||||
ScriptHashAddrID: 0xc4, // starts with 2
|
ScriptHashAddrID: 0xc4, // starts with 2
|
||||||
|
@ -500,6 +516,10 @@ var SimNetParams = Params{
|
||||||
// Mempool parameters
|
// Mempool parameters
|
||||||
RelayNonStdTxs: true,
|
RelayNonStdTxs: true,
|
||||||
|
|
||||||
|
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||||
|
// BIP 173.
|
||||||
|
Bech32HRPSegwit: "sb", // always sb for sim net
|
||||||
|
|
||||||
// Address encoding magics
|
// Address encoding magics
|
||||||
PubKeyHashAddrID: 0x3f, // starts with S
|
PubKeyHashAddrID: 0x3f, // starts with S
|
||||||
ScriptHashAddrID: 0x7b, // starts with s
|
ScriptHashAddrID: 0x7b, // starts with s
|
||||||
|
|
Loading…
Add table
Reference in a new issue