Skip to main content

Assemble

Trait Assemble 

Source
pub trait Assemble: Send + Sync {
    // Required method
    fn assemble(&self, slot: &Slot, chosen: Vec<Vec<u8>>) -> Vec<Vec<u8>>;

    // Provided method
    fn fee_multiplier(&self, slot: &Slot) -> u32 { ... }
}
Expand description

入れるトランザクションを、決まったことを見て直す口。中核が手数料で選んだあとに呼ぶ。足しても外しても 並べ替えてもいい。ハーベストの鍵は渡さない。返したものが状態に依る確かめで弾かれたら、このブロックでは 口を使わずに、選んだものだけで組み直す

Required Methods§

Source

fn assemble(&self, slot: &Slot, chosen: Vec<Vec<u8>>) -> Vec<Vec<u8>>

chosen(入れる順)の代わりに、入れるもの(入れる順)を返す

Provided Methods§

Source

fn fee_multiplier(&self, slot: &Slot) -> u32

ブロックの手数料の倍率を返す。Assemble::assemble の前に呼び、返した倍率を slot に入れて渡す。 既定では中核が選んだ倍率(slot.fee_multiplier)のまま。下げれば、手数料の低いものを入れられる代わりに、 ハーベスターの手数料は減る。上げれば、選んだもののうち手数料の足りないものは弾かれる

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§