1
0

bitcoin.NetworkConstants: easier changing between testnet and mainnet

This commit is contained in:
SomberNight
2017-11-09 17:47:57 +01:00
parent b4bea48b22
commit 0db5ea67a0
9 changed files with 55 additions and 57 deletions

View File

@@ -678,7 +678,7 @@ is_bip32_key = lambda x: is_xprv(x) or is_xpub(x)
def bip44_derivation(account_id, segwit=False):
bip = 49 if segwit else 44
coin = 1 if bitcoin.TESTNET else 0
coin = 1 if bitcoin.NetworkConstants.TESTNET else 0
return "m/%d'/%d'/%d'" % (bip, coin, int(account_id))
def from_seed(seed, passphrase, is_p2sh):