X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Fstate%2Futxo_view_test.go;h=cf4935f77b4db809c837abbd7481d8744686bb2c;hp=db96d84c3c3a891211f7c75f4e5db3d5ee4ce834;hb=6f7fe6fd7442ddcec8ee959c09b6d45639ef045f;hpb=5d1c9664ba4d870ccabfd995766487e99d1cf1b5 diff --git a/protocol/state/utxo_view_test.go b/protocol/state/utxo_view_test.go index db96d84c..cf4935f7 100644 --- a/protocol/state/utxo_view_test.go +++ b/protocol/state/utxo_view_test.go @@ -61,7 +61,7 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, fetchView: NewUtxoViewpoint(), @@ -101,7 +101,7 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, err: true, @@ -125,12 +125,12 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, err: false, @@ -155,12 +155,12 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(true, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(true, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, true), }, }, err: false, @@ -185,12 +185,12 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(true, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(true, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, true), }, }, err: true, @@ -216,7 +216,7 @@ func TestApplyBlock(t *testing.T) { inputView: NewUtxoViewpoint(), fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(true, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false), }, }, err: false, @@ -242,14 +242,14 @@ func TestApplyBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(false, 0, false), - bc.Hash{V1: 1}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), + bc.Hash{V1: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(false, 0, true), - bc.Hash{V1: 1}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), + bc.Hash{V1: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, gasOnlyTx: true, @@ -277,7 +277,7 @@ func TestApplyBlock(t *testing.T) { inputView: NewUtxoViewpoint(), fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(true, 0, false), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false), }, }, gasOnlyTx: true, @@ -327,7 +327,7 @@ func TestDetachBlock(t *testing.T) { inputView: NewUtxoViewpoint(), fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, err: false, @@ -352,7 +352,7 @@ func TestDetachBlock(t *testing.T) { inputView: NewUtxoViewpoint(), fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, err: false, @@ -376,7 +376,7 @@ func TestDetachBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, err: true, @@ -400,12 +400,12 @@ func TestDetachBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V0: 0}: storage.NewUtxoEntry(false, 0, false), + bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), }, }, err: false, @@ -430,14 +430,14 @@ func TestDetachBlock(t *testing.T) { }, inputView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(false, 0, true), - bc.Hash{V1: 1}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), + bc.Hash{V1: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(false, 0, false), - bc.Hash{V1: 1}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false), + bc.Hash{V1: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, gasOnlyTx: true, @@ -464,7 +464,7 @@ func TestDetachBlock(t *testing.T) { inputView: NewUtxoViewpoint(), fetchView: &UtxoViewpoint{ Entries: map[bc.Hash]*storage.UtxoEntry{ - bc.Hash{V1: 0}: storage.NewUtxoEntry(false, 0, true), + bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true), }, }, gasOnlyTx: true,