diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -41,9 +41,16 @@ func (t *TransactionSummary[IN, OUT]) Apply(ctx context.Context, key string, win | |||
| 41 | func main() { | 41 | func 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{ |
