Add StorageValue::append and speed-up deposit_event (#2282)

* Adds deposit event benchmark

* Add `StorageValue::append`

`StorageValue::append` can be used by types that implement `EncodeAppend` to speed-up situations where you just want to append
an item to storage without wanting to decode all previous items.

* Stay at 100 events

* Fixes compilation

* Use correct year and increase spec version
This commit is contained in:
Bastian Köcher
2019-04-16 13:17:02 +02:00
committed by GitHub
parent a6cbc965a0
commit 72840bd71e
14 changed files with 513 additions and 319 deletions
+8 -1
View File
@@ -9,13 +9,16 @@ hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
safe-mix = { version = "1.0", default-features = false}
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
parity-codec = { version = "3.5", default-features = false, features = ["derive"] }
substrate-primitives = { path = "../../core/primitives", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
srml-support = { path = "../support", default-features = false }
[dev-dependencies]
criterion = "0.2"
[features]
default = ["std"]
std = [
@@ -29,3 +32,7 @@ std = [
"srml-support/std",
"primitives/std",
]
[[bench]]
name = "bench"
harness = false