Skip to content

Commit

Permalink
Fixed duplicated system call start/end definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Apr 19, 2024
1 parent 7918f8b commit db154a5
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions firehose/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,39 +263,6 @@ func (ctx *Context) EndSystemCall() {
ctx.printer.Print("SYSTEM_CALL_END")
}

func (ctx *Context) StartSystemCall() {
if ctx == nil {
return
}

if !ctx.inBlock.Load() {
panic("starting system call while not already within a block scope")
}

if !ctx.inTransaction.CAS(false, true) {
panic("entering a system call while already in a transaction scope")
}

ctx.printer.Print("SYSTEM_CALL_START")
}

func (ctx *Context) EndSystemCall() {
if ctx == nil {
return
}

if !ctx.inBlock.Load() {
panic("ending system call while not already within a block scope")
}

if !ctx.inTransaction.CAS(true, false) {
panic("ending a system call while not in a transaction scope")
}

ctx.resetTransaction()
ctx.printer.Print("SYSTEM_CALL_END")
}

// Transaction methods

func (ctx *Context) StartTransaction(tx *types.Transaction, txIndex uint, baseFee *big.Int) {
Expand Down

0 comments on commit db154a5

Please sign in to comment.