aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorsangtran <tranquangsang12.7@gmail.com>2026-09-05 23:51:10 +0700
committersangtran <tranquangsang12.7@gmail.com>2026-09-05 23:51:10 +0700
commitb843da73dd6a487e4cec0e458ec662fb2edbde14 (patch)
treebc5e378677381db1b52cc56b0756fb06670ded8a /main.go
parente626cee8f7de0dd3ffca4c7297e59a87f790cc02 (diff)
signatureVerified sangtran <tranquangsang12.7@gmail.com> Key: 8DD79823D235E1BB ultimate trust
downloadflux-b843da73dd6a487e4cec0e458ec662fb2edbde14.tar.gz
flux-b843da73dd6a487e4cec0e458ec662fb2edbde14.zip
Verified misc: fix return bug in pebble_state and add on close method cleanup
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index 91b96e3..2399ceb 100644
--- a/main.go
+++ b/main.go
@@ -41,9 +41,16 @@ func (t *TransactionSummary[IN, OUT]) Apply(ctx context.Context, key string, win
41func main() { 41func main() {
42 // init 42 // init
43 ctx := context.Background() 43 ctx := context.Background()
44 // memory backend
45 // backend := state.NewMemoryStateBackend(1)
46 // pebble backend
47 backend, err := state.NewPebbleStateBackend("./data_pebble", 1)
44 48
45 backend := state.NewMemoryStateBackend(1) 49 if err != nil {
50 panic(err)
51 }
46 52
53 defer backend.Close()
47 ctx = core.InjectStateBackend(ctx, backend) 54 ctx = core.InjectStateBackend(ctx, backend)
48 55
49 txList := []Transaction{ 56 txList := []Transaction{