From 7df7f757bc042763c42276a62b49f803cd110878 Mon Sep 17 00:00:00 2001 From: michaeldiamant Date: Fri, 4 Feb 2022 16:35:03 -0500 Subject: [PATCH] Add comment to help explain txntest.Txn rationale Adds commentary based on context found in https://github.com/algorand/go-algorand/pull/2730. --- data/txntest/txn.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/txntest/txn.go b/data/txntest/txn.go index 49cb1be966..cae919cabc 100644 --- a/data/txntest/txn.go +++ b/data/txntest/txn.go @@ -45,8 +45,10 @@ import ( "github.com/algorand/go-algorand/protocol" ) -// Txn exists purely to make it easier to write a -// transaction.Transaction in Go source. +// Txn exists to simplify writing tests where transaction.Transaction might be unwieldy. +// Txn simplifies testing in these ways: +// * Provides a flat structure to simplify object construction. +// * Defines convenience methods to help setup test state. type Txn struct { Type protocol.TxType