From 70be73452743adc4267611e389220dafcd586ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 3 Aug 2018 18:19:45 +0200 Subject: [PATCH] coreapi: dag: Missing batch docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera --- core/coreapi/dag_test.go | 2 +- core/coreapi/interface/dag.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 }