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

Actually save ENR on creation and modification#11602

Merged
dvdplm merged 2 commits into
masterfrom
vorot93/enr-2
Apr 7, 2020
Merged

Actually save ENR on creation and modification#11602
dvdplm merged 2 commits into
masterfrom
vorot93/enr-2

Conversation

@vorot93
Copy link
Copy Markdown

@vorot93 vorot93 commented Apr 5, 2020

Oops

Copy link
Copy Markdown
Collaborator

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

Let's add a full-cycle test that checks saving/loading.

impl EnrManager {
pub fn new(key: Secret, seq: u64) -> Option<Self> {
fn save(&mut self) {
if let Some(path) = &self.path {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's a bit worrying that this fails silently.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Freestanding save issues a warning on failure.

@vorot93 vorot93 force-pushed the vorot93/enr-2 branch 2 times, most recently from f0f2a7b to f660d61 Compare April 5, 2020 16:18
@dvdplm dvdplm merged commit c92a15d into master Apr 7, 2020
@dvdplm dvdplm deleted the vorot93/enr-2 branch April 7, 2020 18:40
dvdplm added a commit that referenced this pull request Apr 14, 2020
* master: (25 commits)
  Update .gitmodules (#11628)
  ethcore/res: activate ecip-1088 phoenix on classic (#11598)
  Upgrade parity-common deps to latest (#11620)
  Fix Goerli syncing (#11604)
  deps: switch to upstream ctrlc (#11617)
  Deduplicating crate dependencies (part 3 of n) (#11614)
  Deduplicating crate dependencies (part 2 of n, `slab`) (#11613)
  Actually save ENR on creation and modification (#11602)
  Activate POSDAO on xDai chain and update bootnodes (#11610)
  Activate on-chain randomness in POA Core (#11609)
  Deduplicating crate dependencies (part 1 of n) (#11606)
  Update enodes for POA Sokol (#11611)
  Remove .git folder from dogerignore file so vergen library can get build date and commit hash in the binary generatio vergen library can get build date and commit hash in the binary generation (#11608)
  Reduced gas cost for static calls made to precompiles EIP2046/1352 (#11583)
  [easy] `ethcore-bloom-journal` was renamed to `accounts-bloom` (#11605)
  Use serde_json to export hardcoded sync (#11601)
  Node Discovery v4 ENR Extension (EIP-868) (#11540)
  Fix compile warnings (#11595)
  Update version to 3.0.0-alpha.1 (#11592)
  ethcore/res: bump canon fork hash for mordor and kotti testnets (#11584)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants