diff --git a/core/coreapi/dag_test.go b/core/coreapi/dag_test.go index e75699f696f8..16247e1f010d 100644 --- a/core/coreapi/dag_test.go +++ b/core/coreapi/dag_test.go @@ -136,7 +136,7 @@ func TestBatch(t *testing.T) { } _, err = api.Dag().Get(ctx, c) - if err == nil || err.Error() != "merkledag: not found"{ + if err == nil || err.Error() != "merkledag: not found" { t.Error(err) } diff --git a/core/coreapi/interface/dag.go b/core/coreapi/interface/dag.go index a128e97c5bc1..01d6112e74be 100644 --- a/core/coreapi/interface/dag.go +++ b/core/coreapi/interface/dag.go @@ -22,6 +22,7 @@ type DagOps interface { type DagBatch interface { DagOps + // Commit commits nodes to the datastore and announces them to the network Commit(ctx context.Context) error } @@ -35,5 +36,6 @@ type DagAPI interface { // Tree returns list of paths within a node specified by the path. Tree(ctx context.Context, path Path, opts ...options.DagTreeOption) ([]Path, error) + // Batch creates new DagBatch Batch(ctx context.Context) DagBatch }