(t *testing.T)
| 24 | import "testing" |
| 25 | |
| 26 | func TestAddMsg(t *testing.T) { |
| 27 | server := constructServer() |
| 28 | msgpool := newMsgPool(server, 1) |
| 29 | block, err := constructBlock() |
| 30 | if err != nil { |
| 31 | t.Errorf("constructBlock failed :%v", err) |
| 32 | return |
| 33 | } |
| 34 | blockproposalmsg := &blockProposalMsg{ |
| 35 | Block: block, |
| 36 | } |
| 37 | h, _ := HashMsg(blockproposalmsg) |
| 38 | err = msgpool.AddMsg(blockproposalmsg, h) |
| 39 | t.Logf("TestAddMsg %v", err) |
| 40 | } |
| 41 | |
| 42 | func TestHasMsg(t *testing.T) { |
| 43 | server := constructServer() |
nothing calls this directly
no test coverage detected