Skip to content

Compile issues in latest git with fixes included #134

@Serpent6877

Description

@Serpent6877

OS: Ubuntu 18.04
go version go1.15.6 linux/amd64

# go get -u github.com/OpenBazaar/multiwallet
# github.com/OpenBazaar/multiwallet/keys
/root/go/src/github.com/OpenBazaar/multiwallet/keys/keys.go:48:34: masterPrivKey.Child undefined (type *hdkeychain.ExtendedKey has no field or method Child)
/root/go/src/github.com/OpenBazaar/multiwallet/keys/keys.go:177:3: not enough arguments to return
/root/go/src/github.com/OpenBazaar/multiwallet/keys/keys.go:177:24: km.externalKey.Child undefined (type *hdkeychain.ExtendedKey has no field or method Child)
/root/go/src/github.com/OpenBazaar/multiwallet/keys/keys.go:179:3: not enough arguments to return
/root/go/src/github.com/OpenBazaar/multiwallet/keys/keys.go:179:24: km.internalKey.Child undefined (type *hdkeychain.ExtendedKey has no field or method Child)
# github.com/hunterlong/tokenbalance
/root/go/src/github.com/hunterlong/tokenbalance/tokens.go:94:29: cannot use out (type **big.Int) as type *[]interface {} in argument to _Token.contract.Call
/root/go/src/github.com/hunterlong/tokenbalance/tokens.go:106:29: cannot use out (type **big.Int) as type *[]interface {} in argument to _Token.contract.Call
/root/go/src/github.com/hunterlong/tokenbalance/tokens.go:118:29: cannot use out (type *string) as type *[]interface {} in argument to _Token.contract.Call
/root/go/src/github.com/hunterlong/tokenbalance/tokens.go:130:29: cannot use out (type *string) as type *[]interface {} in argument to _Token.contract.Call

Issue is "github.com/btcsuite/btcutil/hdkeychain/extendedkey.go" code change from Child to Derive.

48c48
< 	fourtyFour, err := masterPrivKey.Derive(hd.HardenedKeyStart + 44)
---
> 	fourtyFour, err := masterPrivKey.Child(hd.HardenedKeyStart + 44)
53c53
< 	bitcoin, err := fourtyFour.Derive(hd.HardenedKeyStart + uint32(coinType))
---
> 	bitcoin, err := fourtyFour.Child(hd.HardenedKeyStart + uint32(coinType))
58c58
< 	account, err := bitcoin.Derive(hd.HardenedKeyStart + 0)
---
> 	account, err := bitcoin.Child(hd.HardenedKeyStart + 0)
63c63
< 	external, err = account.Derive(0)
---
> 	external, err = account.Child(0)
68c68
< 	internal, err = account.Derive(1)
---
> 	internal, err = account.Child(1)
177c177
< 		return km.externalKey.Derive(index)
---
> 		return km.externalKey.Child(index)
179c179
< 		return km.internalKey.Derive(index)
---
> 		return km.internalKey.Child(index)

Additional changes should be done to change all "Child" references to "Derive".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions