Skip to content

Commit 5ece9fe

Browse files
authored
Move batch receipt to cache storage (#1178)
* move batch receipt to cache storage * initiate batch receipt cache on main in a correct way * check duplicated batch receipt send or receipt tx and block * reminder batch receipt * remove not used fields on p2p service client
1 parent a78af51 commit 5ece9fe

16 files changed

+229
-806
lines changed

cmd/block/blockGenerator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func initialize(
126126
blockStorage := storage.NewBlockStateStorage()
127127
receiptService := service.NewReceiptService(
128128
query.NewNodeReceiptQuery(),
129-
nil,
130129
query.NewMerkleTreeQuery(),
131130
query.NewNodeRegistrationQuery(),
132131
query.NewBlockQuery(chainType),
@@ -138,6 +137,7 @@ func initialize(
138137
nil,
139138
nil,
140139
nil,
140+
nil,
141141
)
142142
mempoolService := service.NewMempoolService(
143143
transactionUtil,

common/database/migration.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,6 @@ func (m *Migration) Init() error {
145145
)
146146
`,
147147
`
148-
CREATE TABLE IF NOT EXISTS "batch_receipt" (
149-
"sender_public_key" BLOB,
150-
"recipient_public_key" BLOB,
151-
"datum_type" INTEGER,
152-
"datum_hash" BLOB,
153-
"reference_block_height" INTEGER,
154-
"reference_block_hash" BLOB,
155-
"rmr_linked" BLOB,
156-
"recipient_signature" BLOB
157-
)
158-
`,
159-
`
160148
CREATE TABLE IF NOT EXISTS "merkle_tree" (
161149
"id" BLOB,
162150
"tree" BLOB

common/query/batchReceiptQuery.go

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)