Skip to content

Commit

Permalink
fix mock blockchain; golint; bump patch
Browse files Browse the repository at this point in the history
  • Loading branch information
i-norden committed Aug 14, 2020
1 parent e1e392f commit a69ee0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
"github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru"
)

var (
Expand Down Expand Up @@ -2288,13 +2288,11 @@ func (bc *BlockChain) LockTrie(root common.Hash) {
bc.trieLock.Lock()
bc.lockedRoots[root] = true
bc.trieLock.Unlock()
return
}

// UnlockTrie allows dereferencing of the provided root- provided it was previously locked
func (bc *BlockChain) UnlockTrie(root common.Hash) {
bc.trieLock.Lock()
bc.lockedRoots[root] = false
bc.trieLock.Unlock()
return
}
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 9 // Minor version component of the current release
VersionPatch = 11 // Patch version component of the current release
VersionMeta = "statediff-0.0.3" // Version metadata to append to the version string
VersionMeta = "statediff-0.0.4" // Version metadata to append to the version string
)

// Version holds the textual version string.
Expand Down
2 changes: 2 additions & 0 deletions statediff/testhelpers/mocks/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ func (blockChain *BlockChain) SetTdByHash(hash common.Hash, td *big.Int) {
}
blockChain.TDByHash[hash] = td
}

func (blockChain *BlockChain) UnlockTrie(root common.Hash) {}

0 comments on commit a69ee0b

Please sign in to comment.