Skip to content

Commit

Permalink
remove SubstateTaskPool.SharedData as defining closure func is easier
Browse files Browse the repository at this point in the history
  • Loading branch information
alkorang committed Dec 2, 2021
1 parent 0efb4da commit d6d0652
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions research/substate_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ type SubstateTaskPool struct {

Ctx *cli.Context // CLI context required to read additional flags

SharedData interface{}
SharedDataLock *sync.RWMutex

DB *SubstateDB
}

Expand All @@ -71,11 +68,6 @@ func NewSubstateTaskPool(name string, taskFunc SubstateTaskFunc, first, last uin
}
}

func (pool *SubstateTaskPool) InitSharedData(data interface{}) {
pool.SharedData = data
pool.SharedDataLock = &sync.RWMutex{}
}

// ExecuteBlock function iterates on substates of a given block call TaskFunc
func (pool *SubstateTaskPool) ExecuteBlock(block uint64) (numTx int64, err error) {
for tx, substate := range pool.DB.GetBlockSubstates(block) {
Expand Down

0 comments on commit d6d0652

Please sign in to comment.