Transaction Dependency
Enforce a transaction order on the VeChainThor blockchain.
Introduction
DependsOn
Implementation
// check depended tx
if dep := tx.DependsOn(); dep != nil {
found, reverted, err := findTx(*dep)
if err != nil {
return nil, nil, err
}
if !found {
return nil, nil, consensusError("tx dep broken")
}
if reverted {
return nil, nil, consensusError("tx dep reverted")
}
}Last updated
Was this helpful?