Longevity handling. (#903)

This commit is contained in:
Tomasz Drwięga
2018-10-16 10:04:19 +02:00
committed by Gav Wood
parent 8050979660
commit a24e61cb29
9 changed files with 152 additions and 175 deletions
+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;
}