File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,7 @@ func (b *Block) Accept(context.Context) error {
215
215
216
216
txs := b .Txs ()
217
217
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 )
225
219
}
226
220
227
221
b .manager .lastAccepted = blkID
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ func NewManager(
54
54
state state.State ,
55
55
backend * executor.Backend ,
56
56
clk * mockable.Clock ,
57
- onAccept func (* txs.Tx ) error ,
57
+ onAccept func (* txs.Tx ),
58
58
) Manager {
59
59
lastAccepted := state .GetLastAccepted ()
60
60
return & manager {
@@ -78,8 +78,7 @@ type manager struct {
78
78
clk * mockable.Clock
79
79
// Invariant: onAccept is called when [tx] is being marked as accepted, but
80
80
// 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 )
83
82
84
83
// blkIDToState is a map from a block's ID to the state of the block.
85
84
// Blocks are put into this map when they are verified.
Original file line number Diff line number Diff line change @@ -40,9 +40,7 @@ func (tx *Tx) Accept(context.Context) error {
40
40
return fmt .Errorf ("%w: %s" , errTxNotProcessing , s )
41
41
}
42
42
43
- if err := tx .vm .onAccept (tx .tx ); err != nil {
44
- return err
45
- }
43
+ tx .vm .onAccept (tx .tx )
46
44
47
45
executor := & executor.Executor {
48
46
Codec : tx .vm .txBackend .Codec ,
You can’t perform that action at this time.
0 commit comments