Store new contract info including the type of contract

This commit is contained in:
Martin Boehm 2023-02-27 19:50:05 +01:00
parent 0f23f10fe0
commit fed5fb3dac

View File

@ -609,6 +609,9 @@ func (w *Worker) getContractDescriptorInfo(cd bchain.AddressDescriptor, typeFrom
validContract = false validContract = false
} else { } else {
if typeFromContext != bchain.UnknownTokenType && contractInfo.Type == bchain.UnknownTokenType {
contractInfo.Type = typeFromContext
}
if err = w.db.StoreContractInfo(contractInfo); err != nil { if err = w.db.StoreContractInfo(contractInfo); err != nil {
glog.Errorf("StoreContractInfo error %v, contract %v", err, cd) glog.Errorf("StoreContractInfo error %v, contract %v", err, cd)
} }