Remove hardcoded xpub length #203

This commit is contained in:
Martin Boehm 2019-06-17 18:43:13 +02:00
parent 20eed82e48
commit 701348c96d

View File

@ -13,7 +13,6 @@ import (
"github.com/juju/errors"
)
const xpubLen = 111
const defaultAddressesGap = 20
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) {
if w.chainType != bchain.ChainBitcoinType || len(xpub) != xpubLen {
if w.chainType != bchain.ChainBitcoinType {
return nil, 0, ErrUnsupportedXpub
}
var (