Make worker more resistant to weird data in ethereum blockchain

ethereum
Martin Boehm 2018-12-04 14:23:11 +01:00
parent 4a216fa647
commit 5e170b8dd8
1 changed files with 5 additions and 1 deletions

View File

@ -473,7 +473,11 @@ func (w *Worker) getEthereumTypeAddressBalances(addrDesc bchain.AddressDescripto
}
b, err = w.chain.EthereumTypeGetErc20ContractBalance(addrDesc, c.Contract)
if err != nil {
return nil, nil, nil, errors.Annotatef(err, "EthereumTypeGetErc20ContractBalance %v %v", addrDesc, c.Contract)
// return nil, nil, nil, errors.Annotatef(err, "EthereumTypeGetErc20ContractBalance %v %v", addrDesc, c.Contract)
glog.Warningf("EthereumTypeGetErc20ContractBalance addr %v, contract %v, %v", addrDesc, c.Contract, err)
}
if b == nil {
b = &big.Int{}
}
erc20t[i] = Erc20Token{
Balance: bchain.AmountToDecimalString(b, ci.Decimals),