commit 05c88d4eaded3b59def4aefa8274b1fb219e1c1c
parent 1bf418a3ad2e326f4f085305efd83285557f9826
Author: lash <dev@holbrook.no>
Date: Thu, 27 Jun 2024 16:02:42 +0100
Use tx src instead of raw
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/proxy/service_test.go b/proxy/service_test.go
@@ -14,7 +14,7 @@ import (
func TestProxyServerStart(t *testing.T) {
var err error
var tx types.Transaction
- tx_test := "0x1c7770f04251de106344bc5e4c25a27143db9d40504045039d3d25c5b20b7740"
+ tx_test := "0x60891c813816bb378ee8af428c5eb53b0479c980307d265e4abe39b4efd02e1d"
dbpath, dbenv := os.LookupEnv("TEST_LMDB_DIR")
if !dbenv {
@@ -44,4 +44,5 @@ func TestProxyServerStart(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ t.Logf("tx %v", tx_test)
}
diff --git a/store/lmdb/lmdb.go b/store/lmdb/lmdb.go
@@ -52,7 +52,7 @@ func (l *LmdbStore) GetTransaction(k []byte) (*types.Transaction, error) {
tx := &types.Transaction{}
kp := make([]byte, len(k) + 7)
- copy(kp, []byte("tx/raw/"))
+ copy(kp, []byte("tx/src/"))
copy(kp[7:], k)
err := l.env.View(func(txn *lmdb.Txn) (error) {
@@ -68,7 +68,7 @@ func (l *LmdbStore) GetTransaction(k []byte) (*types.Transaction, error) {
if err != nil {
return tx, err
}
- err = tx.UnmarshalBinary(b)
+ err = tx.UnmarshalJSON(b)
if err != nil {
return nil, err
}