OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat(federation): add address in /list-txs (#224)
[bytom/vapor.git]
/
wallet
/
annotated.go
diff --git
a/wallet/annotated.go
b/wallet/annotated.go
index
746ac5a
..
db305e5
100644
(file)
--- a/
wallet/annotated.go
+++ b/
wallet/annotated.go
@@
-220,18
+220,18
@@
func (w *Wallet) getAddressFromControlProgram(prog []byte, isMainchain bool) str
if segwit.IsP2WPKHScript(prog) {
if pubHash, err := segwit.GetHashFromStandardProg(prog); err == nil {
if segwit.IsP2WPKHScript(prog) {
if pubHash, err := segwit.GetHashFromStandardProg(prog); err == nil {
- return
b
uildP2PKHAddress(pubHash, netParams)
+ return
B
uildP2PKHAddress(pubHash, netParams)
}
} else if segwit.IsP2WSHScript(prog) {
if scriptHash, err := segwit.GetHashFromStandardProg(prog); err == nil {
}
} else if segwit.IsP2WSHScript(prog) {
if scriptHash, err := segwit.GetHashFromStandardProg(prog); err == nil {
- return
b
uildP2SHAddress(scriptHash, netParams)
+ return
B
uildP2SHAddress(scriptHash, netParams)
}
}
return ""
}
}
}
return ""
}
-func
b
uildP2PKHAddress(pubHash []byte, netParams *consensus.Params) string {
+func
B
uildP2PKHAddress(pubHash []byte, netParams *consensus.Params) string {
address, err := common.NewAddressWitnessPubKeyHash(pubHash, netParams)
if err != nil {
return ""
address, err := common.NewAddressWitnessPubKeyHash(pubHash, netParams)
if err != nil {
return ""
@@
-240,7
+240,7
@@
func buildP2PKHAddress(pubHash []byte, netParams *consensus.Params) string {
return address.EncodeAddress()
}
return address.EncodeAddress()
}
-func
b
uildP2SHAddress(scriptHash []byte, netParams *consensus.Params) string {
+func
B
uildP2SHAddress(scriptHash []byte, netParams *consensus.Params) string {
address, err := common.NewAddressWitnessScriptHash(scriptHash, netParams)
if err != nil {
return ""
address, err := common.NewAddressWitnessScriptHash(scriptHash, netParams)
if err != nil {
return ""