File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ type BlockContext struct {
25
25
}
26
26
27
27
type BlockEvent struct {
28
+ Block ledger.Block `json:"-"`
28
29
BlockBodySize uint64 `json:"blockBodySize"`
29
30
IssuerVkey string `json:"issuerVkey"`
30
31
BlockHash string `json:"blockHash"`
@@ -51,6 +52,7 @@ func NewBlockHeaderContext(block ledger.BlockHeader) BlockContext {
51
52
52
53
func NewBlockEvent (block ledger.Block , includeCbor bool ) BlockEvent {
53
54
evt := BlockEvent {
55
+ Block : block ,
54
56
BlockBodySize : block .BlockBodySize (),
55
57
BlockHash : block .Hash (),
56
58
IssuerVkey : block .IssuerVkey ().Hash ().String (),
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ type TransactionContext struct {
28
28
}
29
29
30
30
type TransactionEvent struct {
31
+ Transaction ledger.Transaction `json:"-"`
31
32
BlockHash string `json:"blockHash"`
32
33
TransactionCbor byteSliceJsonHex `json:"transactionCbor,omitempty"`
33
34
Inputs []ledger.TransactionInput `json:"inputs"`
@@ -59,11 +60,12 @@ func NewTransactionEvent(
59
60
includeCbor bool ,
60
61
) TransactionEvent {
61
62
evt := TransactionEvent {
62
- BlockHash : block .Hash (),
63
- Inputs : tx .Inputs (),
64
- Outputs : tx .Outputs (),
65
- Fee : tx .Fee (),
66
- TTL : tx .TTL (),
63
+ Transaction : tx ,
64
+ BlockHash : block .Hash (),
65
+ Inputs : tx .Inputs (),
66
+ Outputs : tx .Outputs (),
67
+ Fee : tx .Fee (),
68
+ TTL : tx .TTL (),
67
69
}
68
70
if includeCbor {
69
71
evt .TransactionCbor = tx .Cbor ()
You can’t perform that action at this time.
0 commit comments