"encoding/json"
"fmt"
+ btmConsensus "github.com/bytom/consensus"
log "github.com/sirupsen/logrus"
"github.com/vapor/account"
func (w *Wallet) getAddressFromControlProgram(prog []byte, isMainchain bool) string {
netParams := &consensus.ActiveNetParams
if isMainchain {
- netParams = &consensus.MainNetParams
+ netParams := new(consensus.Params)
+ netParams.Name = btmConsensus.MainNetParams.Name
+ netParams.Bech32HRPSegwit = btmConsensus.MainNetParams.Bech32HRPSegwit
}
if segwit.IsP2WPKHScript(prog) {