(t *testing.T)
| 128 | } |
| 129 | |
| 130 | func TestClient_BlockByNumber(t *testing.T) { |
| 131 | t.Skip("must start chain to test") |
| 132 | client, err := cpclient.Dial("http://localhost:8501") |
| 133 | // local |
| 134 | if err != nil { |
| 135 | log.Fatal(err.Error()) |
| 136 | } |
| 137 | block, err := client.BlockByNumber(context.Background(), big.NewInt(138)) |
| 138 | if err != nil { |
| 139 | log.Fatal("BlockByNumber is error: ", err) |
| 140 | } |
| 141 | Number := block.Number() |
| 142 | tx := block.Transactions() |
| 143 | fmt.Println("block Transactions is :", tx) |
| 144 | fmt.Println("the blcok number is :", Number) |
| 145 | |
| 146 | } |
| 147 | |
| 148 | func TestClient_ChainConfig(t *testing.T) { |
| 149 | t.Skip("must start chain to test") |
nothing calls this directly
no test coverage detected