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

fix(whisper): change expiry unix_time + ttl + work #10587

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

niklasad1
Copy link
Collaborator

@niklasad1 niklasad1 commented Apr 11, 2019

@niklasad1 niklasad1 added A0-pleasereview 🤓 Pull request needs code review. A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). B1-patch-beta 🕷🕷 B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. labels Apr 11, 2019
@niklasad1 niklasad1 force-pushed the whisper-fix-unintentional-sub branch from e105b81 to 52c35b1 Compare April 11, 2019 16:05
@niklasad1 niklasad1 requested a review from rphmeier April 11, 2019 16:06
@niklasad1 niklasad1 removed the A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). label Apr 11, 2019
@@ -271,7 +271,7 @@ impl Message {
assert!(params.ttl > 0);

let expiry = {
let after_mining = SystemTime::now().checked_sub(Duration::from_millis(params.work))
let after_mining = SystemTime::now().checked_add(Duration::from_secs(params.ttl))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be SystemTime::now() + params.work + params.ttl? And the var name should be changed to reflect meaning of code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, agree

@niklasad1 niklasad1 force-pushed the whisper-fix-unintentional-sub branch from 52c35b1 to c74a50e Compare April 15, 2019 12:45
@niklasad1 niklasad1 changed the title fix(whisper): expiry should be UNIX_TIME + TTL fix(whisper): change expiry unix_time + ttl + work Apr 15, 2019
@TriplEight TriplEight merged commit 92e770e into master Apr 15, 2019
@niklasad1 niklasad1 deleted the whisper-fix-unintentional-sub branch April 15, 2019 13:07
@soc1c soc1c mentioned this pull request May 10, 2019
5 tasks
@soc1c soc1c mentioned this pull request May 10, 2019
9 tasks
soc1c added a commit that referenced this pull request May 10, 2019
* version: bump stable to 2.4.6

* fix(whisper expiry): current time + work + ttl (#10587)

* update bootnodes (#10595)

* config: update goerli bootnodes

* config: update kotti bootnodes

* Constantinople HF on POA Core (#10606)

* Constantinople HF on POA Core

Plan Constantinople/St.Petersfork HF on POA Core network at block 8582254.
Original PR in POA repository: poanetwork/poa-chain-spec#110

* Remove extra empty line

* evm: add some mulmod benches (#10600)

* evm: add blockhash_mulmod bench

* evm: use num-bigint for mod ops

* Update kovan.json to switch validator set to POA Consensus Contracts (#10628)

* Fix publish docs (#10635)

* Fix publish docs

* this never should be forced, either way compiling previous versions will produce outdated docs

* fix array, var was moved to the group project global variables list
soc1c added a commit that referenced this pull request May 10, 2019
* version: bump beta to 2.5.1

* fix(whisper expiry): current time + work + ttl (#10587)

* update bootnodes (#10595)

* config: update goerli bootnodes

* config: update kotti bootnodes

* adds rpc error message for --no-ancient-blocks (#10608)

* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>

* Constantinople HF on POA Core (#10606)

* Constantinople HF on POA Core

Plan Constantinople/St.Petersfork HF on POA Core network at block 8582254.
Original PR in POA repository: poanetwork/poa-chain-spec#110

* Remove extra empty line

* evm: add some mulmod benches (#10600)

* evm: add blockhash_mulmod bench

* evm: use num-bigint for mod ops

* Clique: zero-fill extradata when the supplied value is less than 32 bytes in length (#10605)

* Update kovan.json to switch validator set to POA Consensus Contracts (#10628)

* Fix publish docs (#10635)

* Fix publish docs

* this never should be forced, either way compiling previous versions will produce outdated docs

* fix array, var was moved to the group project global variables list

* Fix rinkeby petersburg fork (#10632)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants