Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
Edit Debug Info
Browse files Browse the repository at this point in the history
  • Loading branch information
asuleymanov committed Oct 9, 2017
1 parent af0d21e commit 7791005
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions transactions/sign_the_shit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/sha256"
"encoding/hex"
_ "encoding/hex"
"errors"
"fmt"
//secp256k1 "github.com/btcsuite/btcd/btcec"
Expand All @@ -29,7 +29,8 @@ func (tx *SignedTransaction) Sign_Single(priv_b []byte, data []byte) []byte {
}

func signBuffer(buf []byte, private_key *ecdsa.PrivateKey) []byte {
log.Println("signBuffer buf=", hex.EncodeToString(buf))
//Debug info
//log.Println("signBuffer buf=", hex.EncodeToString(buf))
// Hash a message.
alg := sha256.New()
alg.Write(buf)
Expand All @@ -40,7 +41,8 @@ func signBuffer(buf []byte, private_key *ecdsa.PrivateKey) []byte {
}

func signBufferSha256(buf_sha256 []byte, private_key *ecdsa.PrivateKey) []byte { // *secp256k1.Signature
log.Println("signBufferSha256 buf_sha256=", hex.EncodeToString(buf_sha256))
//Debug info
//log.Println("signBufferSha256 buf_sha256=", hex.EncodeToString(buf_sha256))

var buf_sha256_clone = make([]byte, len(buf_sha256))
copy(buf_sha256_clone, buf_sha256)
Expand Down

0 comments on commit 7791005

Please sign in to comment.