14
14
#include " primitives/ticket/ticket.hpp"
15
15
#include " primitives/tipset/tipset.hpp"
16
16
#include " vm/actor/builtin/market/actor.hpp"
17
+ #include " vm/actor/builtin/miner/types.hpp"
17
18
#include " vm/actor/builtin/payment_channel/payment_channel_actor_state.hpp"
18
19
#include " vm/runtime/runtime_types.hpp"
19
20
@@ -38,15 +39,17 @@ namespace fc::api {
38
39
using primitives::TipsetWeight;
39
40
using primitives::TokenAmount;
40
41
using primitives::address::Address;
41
- using primitives::block::Block ;
42
+ using primitives::block::BlockMsg ;
42
43
using primitives::ticket::EPostProof;
43
44
using primitives::ticket::Ticket;
44
45
using primitives::tipset::HeadChange;
45
46
using primitives::tipset::Tipset;
46
47
using primitives::tipset::TipsetKey;
47
48
using vm::actor::Actor;
48
- using vm::actor::builtin::market::OnChainDeal;
49
+ using vm::actor::builtin::market::DealProposal;
50
+ using vm::actor::builtin::market::DealState;
49
51
using vm::actor::builtin::market::StorageParticipantBalance;
52
+ using vm::actor::builtin::miner::SectorOnChainInfo;
50
53
using vm::actor::builtin::payment_channel::SignedVoucher;
51
54
using vm::message::SignedMessage;
52
55
using vm::message::UnsignedMessage;
@@ -69,17 +72,21 @@ namespace fc::api {
69
72
std::string error;
70
73
};
71
74
72
- using OnChainDealMap = std::map<std::string, OnChainDeal>;
75
+ struct MarketDeal {
76
+ DealProposal proposal;
77
+ DealState state;
78
+ };
79
+
80
+ using MarketDealMap = std::map<std::string, MarketDeal>;
73
81
74
82
struct MinerPower {
75
83
StoragePower miner;
76
84
StoragePower total;
77
85
};
78
86
79
87
struct ChainSectorInfo {
80
- SectorNumber sector;
81
- Comm comm_d;
82
- Comm comm_r;
88
+ SectorOnChainInfo info;
89
+ SectorNumber id;
83
90
};
84
91
85
92
struct MsgWait {
@@ -97,13 +104,13 @@ namespace fc::api {
97
104
API_METHOD (MarketEnsureAvailable, void , const Address &, TokenAmount)
98
105
99
106
API_METHOD (MinerCreateBlock,
100
- Block ,
107
+ BlockMsg ,
101
108
const Address &,
102
109
const TipsetKey &,
103
110
const Ticket &,
104
111
const EPostProof &,
105
112
const std::vector<SignedMessage> &,
106
- uint64_t ,
113
+ ChainEpoch ,
107
114
uint64_t )
108
115
109
116
API_METHOD (MpoolPending, std::vector<SignedMessage>, const TipsetKey &)
@@ -125,8 +132,8 @@ namespace fc::api {
125
132
StorageParticipantBalance,
126
133
const Address &,
127
134
const TipsetKey &)
128
- API_METHOD (StateMarketDeals, OnChainDealMap , const TipsetKey &)
129
- API_METHOD (StateMarketStorageDeal, OnChainDeal , DealId, const TipsetKey &)
135
+ API_METHOD (StateMarketDeals, MarketDealMap , const TipsetKey &)
136
+ API_METHOD (StateMarketStorageDeal, MarketDeal , DealId, const TipsetKey &)
130
137
API_METHOD (StateMinerElectionPeriodStart,
131
138
ChainEpoch,
132
139
const Address &,
@@ -144,7 +151,7 @@ namespace fc::api {
144
151
API_METHOD (StateMinerWorker, Address, const Address &, const TipsetKey &)
145
152
API_METHOD (StateWaitMsg, MsgWait, const CID &)
146
153
147
- API_METHOD (SyncSubmitBlock, void , const Block &)
154
+ API_METHOD (SyncSubmitBlock, void , const BlockMsg &)
148
155
149
156
API_METHOD (WalletSign, Signature, const Address &, const Buffer &)
150
157
};
0 commit comments