Longevity handling. (#903)

This commit is contained in:
Tomasz Drwięga authored and Gav Wood committed 2018-10-16 09:04:19 +01:00
1 parent 8050979660
commit a24e61cb29
9 files changed
+152 -175

No files matched your search

+2 -2
View File
@@ -314,10 +314,10 @@ impl<C, A> bft::Proposer<<C as AuthoringApi>::Block> for Proposer<C, A> where
let mut pending_size = 0;
for pending in pending_iterator {
// TODO [ToDr] Probably get rid of it, and validate in runtime.
let encoded_size = pending.data.raw.encode().len();
let encoded_size = pending.data.encode().len();
if pending_size + encoded_size >= MAX_TRANSACTIONS_SIZE { break }
match block_builder.push_extrinsic(pending.data.raw.clone()) {
match block_builder.push_extrinsic(pending.data.clone()) {
Ok(()) => {
pending_size += encoded_size;
}