generated from Warchant/cmake-hunter-seed
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathcommit_batcher.hpp
37 lines (30 loc) · 951 Bytes
/
commit_batcher.hpp
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
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "api/full_node/node_api.hpp"
#include "miner/storage_fsm/types.hpp"
#include "primitives/sector/sector.hpp"
namespace fc::mining {
using CommitCallback = std::function<void(const outcome::result<CID> &)>;
using api::FullNodeApi;
using primitives::sector::AggregateSealVerifyInfo;
using primitives::sector::RegisteredSealProof;
using sector_storage::Proof;
using types::SectorInfo;
struct AggregateInput {
Proof proof;
AggregateSealVerifyInfo info;
RegisteredSealProof spt;
};
class CommitBatcher {
public:
virtual ~CommitBatcher() = default;
virtual outcome::result<void> addCommit(
const SectorInfo §or_info,
const AggregateInput &aggregate_input,
const CommitCallback &callBack) = 0;
virtual void forceSend() = 0;
};
} // namespace fc::mining