mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
refactor: remove finalise closure
This commit is contained in:
parent
c07f69a147
commit
f3513cb0c5
1 changed files with 3 additions and 7 deletions
|
|
@ -197,23 +197,19 @@ func TestCopy(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finalise the changes on all concurrently
|
// Finalise the changes on all concurrently
|
||||||
finalise := func(db *StateDB) {
|
|
||||||
db.Finalise(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(3)
|
wg.Add(3)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
finalise(orig)
|
orig.Finalise(true)
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
finalise(copy)
|
copy.Finalise(true)
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
finalise(ccopy)
|
ccopy.Finalise(true)
|
||||||
}()
|
}()
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue