forked from cerc-io/laconicd-deprecated
rpc: fix deadlock (#614)
This commit is contained in:
parent
ef4193b4d4
commit
3072376371
@ -44,6 +44,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
* (evm) [#603](https://github.com/cosmos/ethermint/pull/603) Add state transition params that enable or disable the EVM `Call` and `Create` operations.
|
* (evm) [#603](https://github.com/cosmos/ethermint/pull/603) Add state transition params that enable or disable the EVM `Call` and `Create` operations.
|
||||||
* (deps) [\#602](https://github.com/cosmos/ethermint/pull/602) Bump tendermint version to [v0.33.9](https://github.com/tendermint/tendermint/releases/tag/v0.33.9)
|
* (deps) [\#602](https://github.com/cosmos/ethermint/pull/602) Bump tendermint version to [v0.33.9](https://github.com/tendermint/tendermint/releases/tag/v0.33.9)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* (rpc) [\#613](https://github.com/cosmos/ethermint/issues/613) Fix potential deadlock caused if the keyring `List` returned an error.
|
||||||
|
|
||||||
## [v0.3.0] - 2020-11-16
|
## [v0.3.0] - 2020-11-16
|
||||||
|
|
||||||
### API Breaking
|
### API Breaking
|
||||||
|
@ -196,6 +196,7 @@ func (api *PublicEthereumAPI) GasPrice() *hexutil.Big {
|
|||||||
func (api *PublicEthereumAPI) Accounts() ([]common.Address, error) {
|
func (api *PublicEthereumAPI) Accounts() ([]common.Address, error) {
|
||||||
api.logger.Debug("eth_accounts")
|
api.logger.Debug("eth_accounts")
|
||||||
api.keyringLock.Lock()
|
api.keyringLock.Lock()
|
||||||
|
defer api.keyringLock.Unlock()
|
||||||
|
|
||||||
addresses := make([]common.Address, 0) // return [] instead of nil if empty
|
addresses := make([]common.Address, 0) // return [] instead of nil if empty
|
||||||
|
|
||||||
@ -204,8 +205,6 @@ func (api *PublicEthereumAPI) Accounts() ([]common.Address, error) {
|
|||||||
return addresses, err
|
return addresses, err
|
||||||
}
|
}
|
||||||
|
|
||||||
api.keyringLock.Unlock()
|
|
||||||
|
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
addressBytes := info.GetPubKey().Address().Bytes()
|
addressBytes := info.GetPubKey().Address().Bytes()
|
||||||
addresses = append(addresses, common.BytesToAddress(addressBytes))
|
addresses = append(addresses, common.BytesToAddress(addressBytes))
|
||||||
|
Loading…
Reference in New Issue
Block a user