/
mempool_item.ts
37 lines (34 loc) · 1.04 KB
/
mempool_item.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {SpendBundle} from "./spend_bundle";
import {Coin} from "./blockchain_format/coin";
import {bytes32} from "./blockchain_format/sized_bytes";
import {NPCResult} from "../consensus/cost_calculator";
import {bool, Optional, uint32, uint64} from "./_python_types_";
import {CoinSpend} from "./coin_spend";
export type BundleCoinSpend = {
coin_spend: CoinSpend;
eligible_for_dedup: bool;
eligible_for_fast_forward: bool;
additions: Coin[];
// cost on the specific solution in this item
cost: Optional<uint64>;
};
export type MempoolItem = {
spend_bundle: SpendBundle;
fee: uint64;
npc_result: NPCResult;
spend_bundle_name: bytes32;
height_added_to_mempool: uint32;
assert_height: Optional<uint32>;
assert_before_height: Optional<uint32>;
assert_before_seconds: Optional<uint64>;
bundle_coin_spends: Record<bytes32, BundleCoinSpend>;
};
export type MempoolItemInJsonDict = {
spend_bundle: SpendBundle;
fee: uint64;
npc_result: NPCResult;
cost: uint64;
spend_bundle_name: bytes32;
additions: Coin[];
removals: Coin[];
};