Remove some fmt.Printf debugging.
This commit is contained in:
parent
c54af23849
commit
378af40329
2 changed files with 9 additions and 11 deletions
|
@ -467,8 +467,6 @@ func (a *Account) NewAddress() (string, error) {
|
||||||
// Request updates from btcd for new transactions sent to this address.
|
// Request updates from btcd for new transactions sent to this address.
|
||||||
a.ReqNewTxsForAddress(addr)
|
a.ReqNewTxsForAddress(addr)
|
||||||
|
|
||||||
fmt.Println("after")
|
|
||||||
|
|
||||||
return addr, nil
|
return addr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1252,20 +1252,20 @@ func newRootBtcAddress(privKey, iv, chaincode []byte,
|
||||||
// address will be unspendable. This step requires an unencrypted or
|
// address will be unspendable. This step requires an unencrypted or
|
||||||
// unlocked btcAddress.
|
// unlocked btcAddress.
|
||||||
func (a *btcAddress) verifyKeypairs() error {
|
func (a *btcAddress) verifyKeypairs() error {
|
||||||
// Parse public key.
|
// Parse public key.
|
||||||
pubkey, err := btcec.ParsePubKey(a.pubKey, btcec.S256())
|
pubkey, err := btcec.ParsePubKey(a.pubKey, btcec.S256())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(a.privKeyCT.key) != 32 {
|
if len(a.privKeyCT.key) != 32 {
|
||||||
return errors.New("private key unavailable")
|
return errors.New("private key unavailable")
|
||||||
}
|
}
|
||||||
|
|
||||||
privkey := &ecdsa.PrivateKey{
|
privkey := &ecdsa.PrivateKey{
|
||||||
PublicKey: *pubkey,
|
PublicKey: *pubkey,
|
||||||
D: new(big.Int).SetBytes(a.privKeyCT.key),
|
D: new(big.Int).SetBytes(a.privKeyCT.key),
|
||||||
}
|
}
|
||||||
|
|
||||||
data := "String to sign."
|
data := "String to sign."
|
||||||
r, s, err := ecdsa.Sign(rand.Reader, privkey, []byte(data))
|
r, s, err := ecdsa.Sign(rand.Reader, privkey, []byte(data))
|
||||||
|
|
Loading…
Add table
Reference in a new issue