示例#1
0
func assertValidUnspent(t *testing.T, bc *coin.Blockchain,
	unspent *coin.UnspentPool, tx coin.Transaction) {
	expect := bc.TxUxOut(tx, coin.BlockHeader{})
	assert.NotEqual(t, len(expect), 0)
	assert.Equal(t, len(expect), len(unspent.Arr))
	for _, ux := range expect {
		assert.True(t, unspent.Has(ux.Hash()))
	}
}