From e015d4333d07deb6a4f540a6397c86bdff285c50 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 22 Mar 2023 12:53:33 +0800 Subject: [PATCH] update docs --- postgres/doc.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/postgres/doc.md b/postgres/doc.md index 5a4fc75..a1bfba7 100644 --- a/postgres/doc.md +++ b/postgres/doc.md @@ -18,7 +18,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/trie" "github.com/jmoiron/sqlx" - "github.com/vulcanize/ipfs-ethdb/v5/postgres" + "github.com/vulcanize/ipfs-ethdb/v5/postgres/v1" ) func main() { @@ -31,7 +31,11 @@ func main() { trieNodeIterator := t.NodeIterator([]byte{}) // do stuff with trie node iterator - database := pgipfsethdb.NewDatabase(db) + database := pgipfsethdb.NewDatabase(db, pgipfsethdb.CacheConfig{ + Name: "db", + Size: 3000000, // 3MB + ExpiryDuration: time.Hour, + }) stateDatabase := state.NewDatabase(database) stateDB, _ := state.New(common.Hash{}, stateDatabase, nil) stateDBNodeIterator := state.NewNodeIterator(stateDB)