1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const HeaderContext_1 = require("./HeaderContext");
|
4 | class RequestSentContext extends HeaderContext_1.HeaderContext {
|
5 | constructor({ viewNumber, myIndex, primaryIndex, expectedView, validators, blockReceivedTimeSeconds, transactions, signatures, header, }) {
|
6 | super({
|
7 | type: 'primary',
|
8 | viewNumber,
|
9 | myIndex,
|
10 | primaryIndex,
|
11 | expectedView,
|
12 | validators,
|
13 | blockReceivedTimeSeconds,
|
14 | transactions,
|
15 | signatures,
|
16 | header,
|
17 | });
|
18 | }
|
19 | cloneExpectedView({ expectedView }) {
|
20 | return new RequestSentContext({
|
21 | viewNumber: this.viewNumber,
|
22 | myIndex: this.myIndex,
|
23 | primaryIndex: this.primaryIndex,
|
24 | expectedView,
|
25 | validators: this.validators,
|
26 | blockReceivedTimeSeconds: this.blockReceivedTimeSeconds,
|
27 | transactions: this.transactions,
|
28 | signatures: this.signatures,
|
29 | header: {
|
30 | type: 'existing',
|
31 | block: this.header,
|
32 | transactionHashes: this.transactionHashes,
|
33 | },
|
34 | });
|
35 | }
|
36 | cloneSignatures({ signatures, }) {
|
37 | return new RequestSentContext({
|
38 | viewNumber: this.viewNumber,
|
39 | myIndex: this.myIndex,
|
40 | primaryIndex: this.primaryIndex,
|
41 | expectedView: this.expectedView,
|
42 | validators: this.validators,
|
43 | blockReceivedTimeSeconds: this.blockReceivedTimeSeconds,
|
44 | transactions: this.transactions,
|
45 | signatures,
|
46 | header: {
|
47 | type: 'existing',
|
48 | block: this.header,
|
49 | transactionHashes: this.transactionHashes,
|
50 | },
|
51 | });
|
52 | }
|
53 | }
|
54 | exports.RequestSentContext = RequestSentContext;
|
55 |
|
56 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVlc3RTZW50Q29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUdBLG1EQUFnRDtBQTZCaEQ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