Remove hardcoded xpub length #203
This commit is contained in:
parent
20eed82e48
commit
701348c96d
@ -13,7 +13,6 @@ import (
|
|||||||
"github.com/juju/errors"
|
"github.com/juju/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const xpubLen = 111
|
|
||||||
const defaultAddressesGap = 20
|
const defaultAddressesGap = 20
|
||||||
const maxAddressesGap = 10000
|
const maxAddressesGap = 10000
|
||||||
|
|
||||||
@ -271,7 +270,7 @@ func evictXpubCacheItems() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *Worker) getXpubData(xpub string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter, gap int) (*xpubData, uint32, error) {
|
func (w *Worker) getXpubData(xpub string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter, gap int) (*xpubData, uint32, error) {
|
||||||
if w.chainType != bchain.ChainBitcoinType || len(xpub) != xpubLen {
|
if w.chainType != bchain.ChainBitcoinType {
|
||||||
return nil, 0, ErrUnsupportedXpub
|
return nil, 0, ErrUnsupportedXpub
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user