Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Key load avoid warning #1303

Merged
merged 4 commits into from Jun 16, 2016
Merged

Key load avoid warning #1303

merged 4 commits into from Jun 16, 2016

Conversation

NikVolf
Copy link
Contributor

@NikVolf NikVolf commented Jun 16, 2016

  • previosly existance of the key checked by loading it and warning about non-existant key was spawned in the process

@NikVolf NikVolf added the A0-pleasereview 🤓 Pull request needs code review. label Jun 16, 2016
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 16, 2016
@@ -408,7 +412,7 @@ impl EncryptedHashMap<H128> for SecretStore {
}

fn insert<Value: FromRawBytesVariable + BytesConvertable>(&mut self, key: H128, value: Value, password: &str) -> Option<Value> {
let previous = if let Ok(previous_value) = self.get(&key, password) { Some(previous_value) } else { None };
let previous = if self.exists(&key) { Some(self.get(&key, password).expect("we just checked it existsed")) } else { None };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo,
also this is a subject to a race condition. If another process has deleted the key I'd prefer not to panic here

@arkpar arkpar added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Jun 16, 2016
@NikVolf NikVolf added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Jun 16, 2016
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 16, 2016
@gavofyork gavofyork merged commit 07641b8 into master Jun 16, 2016
@gavofyork gavofyork deleted the keys-warn-fix branch June 16, 2016 12:14
arkpar pushed a commit that referenced this pull request Jun 18, 2016
* avoid warning with key

* fix intendations

* more intendation fix

* ok() instead of expect()
gavofyork pushed a commit that referenced this pull request Jun 18, 2016
* More meaningful errors when sending transaction

* Fixing returned value

* Consolidating all RPC error codes

* Fixed loosing peers on incoming connections. (#1293)

* Deactivate peer if it has no new data

* Fixed node table timer registration

* Fixed handshake timeout expiration

* Extra trace

* Fixed session count calculation

* Only deactivate incapable peers in ChainHead state

* Timer registration is not needed

* x64 path

* firewall rules

* Fix read-ahead bug.

Re-ahead 8 bytes rather than 3 to ensure large blocks import fine.

* Refactor to use a const.

* Update README.md

* Gas price statistics. (#1291)

* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.

* Key load avoid warning (#1303)

* avoid warning with key

* fix intendations

* more intendation fix

* ok() instead of expect()

* Appveyor config for windows build+installer (#1302)

* appveyor

* proper dist name

* quote

* win-build config

* proper build section

* tests in release

* plugin dir

* cache binaries

* quotes

* escaped quotes

* forces user dir

* fixes

* syntax

* proper cahce dir

* quotes?

* root nsis instead of bin

* submodules init

* artifact path fix

* no submodule

* raw link here

* another way to force cargo cache

* include vc++ 2015 redist

* fix name of the dist

* ETHCORE -> Ethcore

* Disabling ethcore_set* APIs (+ Status page)
gavofyork pushed a commit that referenced this pull request Jun 18, 2016
* More meaningful errors when sending transaction

* Fixing returned value

* Consolidating all RPC error codes

* Fixed loosing peers on incoming connections. (#1293)

* Deactivate peer if it has no new data

* Fixed node table timer registration

* Fixed handshake timeout expiration

* Extra trace

* Fixed session count calculation

* Only deactivate incapable peers in ChainHead state

* Timer registration is not needed

* x64 path

* firewall rules

* Fix read-ahead bug.

Re-ahead 8 bytes rather than 3 to ensure large blocks import fine.

* Refactor to use a const.

* Update README.md

* Gas price statistics. (#1291)

* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.

* Key load avoid warning (#1303)

* avoid warning with key

* fix intendations

* more intendation fix

* ok() instead of expect()

* Filling-in optional fields of TransactionRequest.

* Adding reference to miner
gavofyork pushed a commit that referenced this pull request Jun 18, 2016
* More meaningful errors when sending transaction

* Fixing returned value

* Consolidating all RPC error codes

* Fixed loosing peers on incoming connections. (#1293)

* Deactivate peer if it has no new data

* Fixed node table timer registration

* Fixed handshake timeout expiration

* Extra trace

* Fixed session count calculation

* Only deactivate incapable peers in ChainHead state

* Timer registration is not needed

* x64 path

* firewall rules

* Fix read-ahead bug.

Re-ahead 8 bytes rather than 3 to ensure large blocks import fine.

* Refactor to use a const.

* Update README.md

* Gas price statistics. (#1291)

* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.

* Key load avoid warning (#1303)

* avoid warning with key

* fix intendations

* more intendation fix

* ok() instead of expect()

* Appveyor config for windows build+installer (#1302)

* appveyor

* proper dist name

* quote

* win-build config

* proper build section

* tests in release

* plugin dir

* cache binaries

* quotes

* escaped quotes

* forces user dir

* fixes

* syntax

* proper cahce dir

* quotes?

* root nsis instead of bin

* submodules init

* artifact path fix

* no submodule

* raw link here

* another way to force cargo cache

* include vc++ 2015 redist

* fix name of the dist

* ETHCORE -> Ethcore

* Bumping topbar. Fixing ws server closing when suspending
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants