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
Paging (#234)
[bytom/vapor.git]
/
wallet
/
annotated.go
diff --git
a/wallet/annotated.go
b/wallet/annotated.go
index
6604876
..
db305e5
100644
(file)
--- a/
wallet/annotated.go
+++ b/
wallet/annotated.go
@@
-33,6
+33,7
@@
func annotateTxsAsset(w *Wallet, txs []*query.AnnotatedTx) {
}
func (w *Wallet) getExternalDefinition(assetID *bc.AssetID) json.RawMessage {
}
func (w *Wallet) getExternalDefinition(assetID *bc.AssetID) json.RawMessage {
+ // definitionByte := w.DB.Get(asset.ExtAssetKey(assetID))
definitionByte := w.DB.Get(asset.ExtAssetKey(assetID))
if definitionByte == nil {
return nil
definitionByte := w.DB.Get(asset.ExtAssetKey(assetID))
if definitionByte == nil {
return nil
@@
-219,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 ""
@@
-239,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 ""