From 8a743c344a643b22024a23c25dca5f0e0d458273 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 8 Oct 2013 13:12:24 -0400 Subject: [PATCH] Update all comments and test coverage with new func name --- address.go | 4 ++-- script.go | 6 +++--- test_coverage.txt | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/address.go b/address.go index 06708e97..bc76be3f 100644 --- a/address.go +++ b/address.go @@ -5,7 +5,7 @@ package btcscript // ScriptType is an enum type that represents the type of a script. It is -// returned from ScriptToAddress as part of the metadata about the script. +// returned from ScriptToAddrHash as part of the metadata about the script. // It implements the Stringer interface for nice printing. type ScriptType int @@ -31,7 +31,7 @@ var scriptTypeToName = []string{ ScriptAddr: "Addr", ScriptPubKey: "Pubkey", ScriptStrange: "Strange", - ScriptGeneration: "Generation", // ScriptToAddress does not recieve enough information to identify Generation scripts. + ScriptGeneration: "Generation", // ScriptToAddrHash does not recieve enough information to identify Generation scripts. } type pkformat struct { diff --git a/script.go b/script.go index 86ae9198..3488d184 100644 --- a/script.go +++ b/script.go @@ -74,7 +74,7 @@ var StackErrTooManyOperations = errors.New("Too many operations in script") // the stack is over MaxScriptElementSize. var StackErrElementTooBig = errors.New("Element in script too large") -// StackErrUnknownAddress is returned when ScriptToAddress does not recognise +// StackErrUnknownAddress is returned when ScriptToAddrHash does not recognise // the pattern of the script and thus can not find the address for payment. var StackErrUnknownAddress = errors.New("non-recognised address") @@ -97,11 +97,11 @@ var StackErrEmptyStack = errors.New("Stack empty at end of execution") var StackErrP2SHNonPushOnly = errors.New("pay to script hash with non " + "pushonly input") -// StackErrInvalidParseType is an internal error returned from ScriptToAddress +// StackErrInvalidParseType is an internal error returned from ScriptToAddrHash // ony if the internal data tables are wrong. var StackErrInvalidParseType = errors.New("internal error: invalid parsetype found") -// StackErrInvalidAddrOffset is an internal error returned from ScriptToAddress +// StackErrInvalidAddrOffset is an internal error returned from ScriptToAddrHash // ony if the internal data tables are wrong. var StackErrInvalidAddrOffset = errors.New("internal error: invalid offset found") diff --git a/test_coverage.txt b/test_coverage.txt index 8515d055..fdcee9cc 100644 --- a/test_coverage.txt +++ b/test_coverage.txt @@ -1,5 +1,5 @@ -github.com/conformal/btcscript/address.go scriptToAddressTemplate 100.00% (58/58) +github.com/conformal/btcscript/address.go scriptToAddrHashTemplate 100.00% (45/45) github.com/conformal/btcscript/script.go Script.Step 100.00% (37/37) github.com/conformal/btcscript/script.go parseScriptTemplate 100.00% (30/30) github.com/conformal/btcscript/opcode.go parsedOpcode.bytes 100.00% (23/23) @@ -89,7 +89,7 @@ github.com/conformal/btcscript/script.go setStack 100.00% (3/3) github.com/conformal/btcscript/stack.go fromBool 100.00% (3/3) github.com/conformal/btcscript/script.go scriptUInt32 100.00% (3/3) github.com/conformal/btcscript/opcode.go opcodeCodeSeparator 100.00% (2/2) -github.com/conformal/btcscript/address.go ScriptToAddress 100.00% (2/2) +github.com/conformal/btcscript/address.go ScriptToAddrHash 100.00% (2/2) github.com/conformal/btcscript/stack.go Stack.NipN 100.00% (2/2) github.com/conformal/btcscript/opcode.go opcodeDepth 100.00% (2/2) github.com/conformal/btcscript/script.go GetSigOpCount 100.00% (2/2) @@ -147,5 +147,5 @@ github.com/conformal/btcscript/script.go Script.Execute 44.44% (8/18) github.com/conformal/btcscript/log.go SetLogWriter 0.00% (0/7) github.com/conformal/btcscript/script.go IsPushOnlyScript 0.00% (0/4) github.com/conformal/btcscript/log.go logClosure.String 0.00% (0/1) -github.com/conformal/btcscript --------------------------- 96.44% (949/984) +github.com/conformal/btcscript --------------------------- 96.40% (936/971)