Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rohenaz committed Feb 7, 2023
1 parent 36684f1 commit d67f27c
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions bob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,21 +605,18 @@ func TestTx_ToString(t *testing.T) {
assert.Equal(t, bobTx.Tx.H, otherBob.Tx.H)
}

// TestTxx_ToString example using ToString()
func TestTxx_ToString(t *testing.T) {
// Use an example TX
bobTx, err := NewFromString(sampleBobTx)
if err != nil {
fmt.Printf("error occurred: %s", err.Error())
}
// TestTx_ToString2 example using ToString()
func TestTx_ToString2(t *testing.T) {
// import a tx from hex
// TODO: - should this even work from a Bob string like this?
goBobTx, err := NewFromRawTxString(parityTx)
assert.NoError(t, err)

var rawTx string
if rawTx, err = bobTx.ToString(); err != nil {
if _, err = goBobTx.ToString(); err != nil {
fmt.Printf("error occurred: %s", err.Error())
}
assert.NoError(t, err)
assert.Equal(t, len(sampleBobTx), len(rawTx))

}

// BenchmarkTx_ToString benchmarks the method ToString()
Expand Down

0 comments on commit d67f27c

Please sign in to comment.