relocate module: bech32 -> base_proto.bitcoin.bech32
This commit is contained in:
parent
abffe1fb57
commit
ffd5943212
2 changed files with 2 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ class mainnet(CoinProtocol.Secp256k1): # chainparams.cpp
|
|||
def parse_addr(self,addr):
|
||||
|
||||
if 'B' in self.mmtypes and addr[:len(self.bech32_hrp)] == self.bech32_hrp:
|
||||
import mmgen.bech32 as bech32
|
||||
import mmgen.base_proto.bitcoin.bech32 as bech32
|
||||
ret = bech32.decode(self.bech32_hrp,addr)
|
||||
|
||||
if ret[0] != self.witness_vernum:
|
||||
|
|
@ -117,7 +117,7 @@ class mainnet(CoinProtocol.Secp256k1): # chainparams.cpp
|
|||
|
||||
def pubhash2bech32addr(self,pubhash):
|
||||
d = list(pubhash)
|
||||
import mmgen.bech32 as bech32
|
||||
import mmgen.base_proto.bitcoin.bech32 as bech32
|
||||
return bech32.bech32_encode(self.bech32_hrp,[self.witness_vernum]+bech32.convertbits(d,8,5))
|
||||
|
||||
class testnet(mainnet):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue