Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b7d4a2a
draft
Jun 2, 2020
d2bb3b8
steps
Jun 2, 2020
7a4426c
chore: fmt
Jun 2, 2020
8eb7a4c
step by step
Jun 3, 2020
fe0682b
more details
Jun 3, 2020
c24b0a3
make test public
Jun 4, 2020
5aec81e
refactor: split into on and offchain
Jun 4, 2020
f1e9367
test stab
Jun 5, 2020
f29babe
tabs my friend
Jun 5, 2020
388970b
offchain overlay: split key into prefix and true key
Jun 9, 2020
1c41dfb
test: share state
Jun 9, 2020
3249272
fix & test
Jun 9, 2020
2600769
docs improv
Jun 9, 2020
5383907
address review comments
Jun 9, 2020
d6a78ca
cleanup test chore
Jun 9, 2020
3e5d00c
refactor, abbrev link text
Jun 9, 2020
dbbb282
chore: linewidth
Jun 10, 2020
2032b6a
fix prefix key split fallout
Jun 10, 2020
1bb092f
minor fallout
Jun 10, 2020
4abd969
minor changes
Jun 10, 2020
1fdc7c1
addresses review comments
Jun 10, 2020
1d271db
rename historical.rs -> historical/mod.rs
Jun 10, 2020
acb67fd
avoid shared::* wildcard import
Jun 10, 2020
359dec9
fix/compile: missing shared:: prefix
Jun 11, 2020
126f6ea
fix: add missing call to store_session_validator_set_to_offchain
Jun 11, 2020
7a7c0b2
fix/test: flow
Jun 12, 2020
87c1696
Merge remote-tracking branch 'origin/master' into bernhard/historical…
Jun 15, 2020
23cc9cf
fix/review: Apply suggestions from code review
drahnr Jun 15, 2020
68ad304
fix/review: more review comment fixes
Jun 15, 2020
bf34c2c
fix/review: make ValidatorSet private
Jun 15, 2020
55f4271
fix/include: core -> sp_core
Jun 15, 2020
6c6c484
fix/review: fallout
Jun 15, 2020
7052484
fix/visbility: make them public API
Jun 15, 2020
6069f35
Merge remote-tracking branch 'origin/master' into bernhard/historical…
Jun 15, 2020
5231d06
fix/review: review changes fallout - again
Jun 16, 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
minor fallout
  • Loading branch information
Bernhard Schuster committed Jun 10, 2020
commit 1bb092f5db9f3dfea0e7fd52c04a396d096437c4
8 changes: 6 additions & 2 deletions client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,12 @@ pub struct BlockImportOperation<Block: BlockT> {

impl<Block: BlockT> BlockImportOperation<Block> {
fn apply_offchain(&mut self, transaction: &mut Transaction<DbHash>) {
for (prefix, key, value_operation) in self.offchain_storage_updates.drain() {
let key: Vec<u8> = prefix.chain(b"/".into_iter()).chain(key).collect();
for ((prefix, key), value_operation) in self.offchain_storage_updates.drain() {
let key: Vec<u8> = prefix
.into_iter()
.chain(b"/".into_iter().copied())
.chain(key.into_iter())
.collect();
match value_operation {
OffchainOverlayedChange::SetValue(val) => transaction.set_from_vec(columns::OFFCHAIN, &key, val),
OffchainOverlayedChange::Remove => transaction.remove(columns::OFFCHAIN, &key),
Expand Down
7 changes: 5 additions & 2 deletions primitives/core/src/offchain/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,11 @@ mod test {
ooc.set(STORAGE_PREFIX, b"ppp", b"rrr");
let mut iter = ooc.into_iter();
assert_eq!(
iter.next(), Some((STORAGE_PREFIX.to_vec(), b"ppp".to_vec()),
OffchainOverlayedChange::SetValue(b"rrr".to_vec()))
iter.next(),
Some(
((STORAGE_PREFIX.to_vec(), b"ppp".to_vec()),
OffchainOverlayedChange::SetValue(b"rrr".to_vec()))
)
);
assert_eq!(iter.next(), None);
}
Expand Down