Skip to content

Commit cf09730

Browse files
committed
fix build
Signed-off-by: Joshua Kim <[email protected]>
1 parent d3518dd commit cf09730

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

vms/avm/block/executor/block.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,7 @@ func (b *Block) Accept(context.Context) error {
215215

216216
txs := b.Txs()
217217
for _, tx := range txs {
218-
if err := b.manager.onAccept(tx); err != nil {
219-
return fmt.Errorf(
220-
"failed to mark tx %q as accepted: %w",
221-
blkID,
222-
err,
223-
)
224-
}
218+
b.manager.onAccept(tx)
225219
}
226220

227221
b.manager.lastAccepted = blkID

vms/avm/block/executor/manager.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewManager(
5454
state state.State,
5555
backend *executor.Backend,
5656
clk *mockable.Clock,
57-
onAccept func(*txs.Tx) error,
57+
onAccept func(*txs.Tx),
5858
) Manager {
5959
lastAccepted := state.GetLastAccepted()
6060
return &manager{
@@ -78,8 +78,7 @@ type manager struct {
7878
clk *mockable.Clock
7979
// Invariant: onAccept is called when [tx] is being marked as accepted, but
8080
// before its state changes are applied.
81-
// Invariant: any error returned by onAccept should be considered fatal.
82-
onAccept func(*txs.Tx) error
81+
onAccept func(*txs.Tx)
8382

8483
// blkIDToState is a map from a block's ID to the state of the block.
8584
// Blocks are put into this map when they are verified.

vms/avm/tx.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ func (tx *Tx) Accept(context.Context) error {
4040
return fmt.Errorf("%w: %s", errTxNotProcessing, s)
4141
}
4242

43-
if err := tx.vm.onAccept(tx.tx); err != nil {
44-
return err
45-
}
43+
tx.vm.onAccept(tx.tx)
4644

4745
executor := &executor.Executor{
4846
Codec: tx.vm.txBackend.Codec,

0 commit comments

Comments
 (0)