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

Time-delay proxies #6770

Merged
38 commits merged into from
Aug 23, 2020
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c8abcbc
Time-delay proxies.
gavofyork Jul 30, 2020
d9b4f18
Tests
gavofyork Jul 31, 2020
a391766
Initial couple of benchmarks
gavofyork Aug 2, 2020
6b21ba2
Merge remote-tracking branch 'origin/master' into gav-delay-proxy
gavofyork Aug 2, 2020
e0552cb
Fix up runtime
gavofyork Aug 2, 2020
39d2dd7
Last couple of benchmarks
gavofyork Aug 2, 2020
905505c
Tests
gavofyork Aug 2, 2020
55b9db4
Docs
gavofyork Aug 2, 2020
4e6474b
Migration
gavofyork Aug 2, 2020
2143169
add tests to proxy benchmarks
shawntabrizi Aug 3, 2020
cd49b2e
generated benchmarks, not integrated
shawntabrizi Aug 3, 2020
202b3c1
Fix weight trait
shawntabrizi Aug 3, 2020
000ff6b
integrate weightinfo
shawntabrizi Aug 3, 2020
5b21635
Merge branch 'master' into gav-delay-proxy
shawntabrizi Aug 3, 2020
ef30122
default weight
shawntabrizi Aug 3, 2020
a87b928
Grumble
gavofyork Aug 4, 2020
402dd67
Deduplication, split proxy from announced_proxy and don't require rea…
gavofyork Aug 4, 2020
ffa36e8
Fix
gavofyork Aug 4, 2020
083bf24
Remoe superfluous
gavofyork Aug 4, 2020
61b57b6
Typos
gavofyork Aug 4, 2020
2492f06
Indent
gavofyork Aug 4, 2020
c02e86c
Fix
gavofyork Aug 4, 2020
c7f0962
Fixes
gavofyork Aug 4, 2020
b077e78
rename 'proxy_announced' -> 'announced_proxy'
shawntabrizi Aug 4, 2020
64e77b4
flip rename
shawntabrizi Aug 4, 2020
33c69ef
comments and spacing
shawntabrizi Aug 4, 2020
a7aa2eb
fix proxy_announced
shawntabrizi Aug 4, 2020
2395ffa
remove unneeded `execute` marker
shawntabrizi Aug 4, 2020
2c3649e
Avoid unneeded changes to extrinsic indices
gavofyork Aug 4, 2020
ec164eb
Merge remote-tracking branch 'origin/gav-delay-proxy' into gav-delay-…
gavofyork Aug 4, 2020
9a4d912
Cleanup
gavofyork Aug 4, 2020
34162ac
Fixes
gavofyork Aug 4, 2020
4094a17
Update Benchmarks and Weights for Delayed Proxy (#6811)
shawntabrizi Aug 4, 2020
2799ae1
Merge branch 'master' into gav-delay-proxy
shawntabrizi Aug 5, 2020
534734f
Merge branch 'master' into gav-delay-proxy
shawntabrizi Aug 19, 2020
c3bfd76
Merge remote-tracking branch 'origin/master' into gav-delay-proxy
gavofyork Aug 21, 2020
135462c
Bump runtime
gavofyork Aug 21, 2020
94d465c
Fix benchmark
gavofyork Aug 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unneeded execute marker
  • Loading branch information
shawntabrizi committed Aug 4, 2020
commit 2395ffa6003043e8aeb3fc54050e5a5167ed3a84
6 changes: 2 additions & 4 deletions frame/proxy/src/lib.rs
Original file line number Diff line number Diff line change
@@ -354,18 +354,16 @@ decl_module! {

let call_hash = T::CallHasher::hash_of(&call);
let now = system::Module::<T>::block_number();
let mut execute = false;
Self::edit_announcements(&delegate, |ann| {
if ann.real == real && ann.call_hash == call_hash {
// If delay has passed, we remove the announcement and note to execute the call.
// If delay has passed, we remove the announcement and we will
// execute the call below.
if now.saturating_sub(ann.height) >= def.delay {
execute = true;
return false
}
}
true
})?;
ensure!(execute, Error::<T>::Unannounced);

Self::do_proxy(def, real, *call);
}