Skip to content

Commit 544d883

Browse files
authored
feat:track transaction fee and TTL (#1016)
Signed-off-by: Jenita <jkawan@blinklabs.io>
1 parent a01f5ab commit 544d883

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

database/models/transaction.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ type Transaction struct {
2727
Type int
2828
BlockIndex uint32
2929
Metadata []byte
30+
Fee uint64
31+
TTL uint64
3032
}
3133

3234
func (Transaction) TableName() string {

database/plugin/metadata/sqlite/transaction.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ func (d *MetadataStoreSqlite) SetTransaction(
6363
Type: tx.Type(),
6464
BlockHash: point.Hash,
6565
BlockIndex: idx,
66+
Fee: tx.Fee(),
67+
TTL: tx.TTL(),
6668
}
6769
if tx.Metadata() != nil {
6870
tmpMetadata := tx.Metadata().Cbor()

0 commit comments

Comments
 (0)