More test code
This commit is contained in:
parent
b394444b11
commit
0f986d6cf3
1 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"github.com/conformal/btcjson"
|
||||||
"github.com/conformal/btcscript"
|
"github.com/conformal/btcscript"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwallet/tx"
|
"github.com/conformal/btcwallet/tx"
|
||||||
|
@ -65,5 +69,19 @@ func TestFakeTxs(t *testing.T) {
|
||||||
t.Errorf("Tx creation failed: %s", err)
|
t.Errorf("Tx creation failed: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_ = rawtx
|
|
||||||
|
msg := btcjson.Message{
|
||||||
|
Jsonrpc: "1.0",
|
||||||
|
Id: "test",
|
||||||
|
Method: "sendrawtransaction",
|
||||||
|
Params: []interface{}{
|
||||||
|
hex.EncodeToString(rawtx),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
m, _ := json.Marshal(msg)
|
||||||
|
_ = m
|
||||||
|
_ = fmt.Println
|
||||||
|
|
||||||
|
// Uncomment to print out json to send raw transaction
|
||||||
|
// fmt.Println(string(m))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue