func (view *UtxoViewpoint) ApplyTransaction(block *bc.Block, tx *bc.Tx, statusFail bool) error {
for _, prevout := range tx.SpentOutputIDs {
- spentOutput, err := tx.Output(prevout)
+ spentOutput, err := tx.IntraChainOutput(prevout)
if err != nil {
return err
}
}
for _, id := range tx.TxHeader.ResultIds {
- output, err := tx.Output(*id)
+ output, err := tx.IntraChainOutput(*id)
if err != nil {
// error due to it's a retirement, utxo doesn't care this output type so skip it
continue
func (view *UtxoViewpoint) DetachTransaction(tx *bc.Tx, statusFail bool) error {
for _, prevout := range tx.SpentOutputIDs {
- spentOutput, err := tx.Output(prevout)
+ spentOutput, err := tx.IntraChainOutput(prevout)
if err != nil {
return err
}
}
for _, id := range tx.TxHeader.ResultIds {
- output, err := tx.Output(*id)
+ output, err := tx.IntraChainOutput(*id)
if err != nil {
// error due to it's a retirement, utxo doesn't care this output type so skip it
continue