},
}
+var coinbaseEntry = map[bc.Hash]bc.Entry{
+ bc.Hash{V0: 0}: &bc.IntraChainOutput{
+ Source: &bc.ValueSource{
+ Value: &bc.AssetAmount{
+ AssetId: consensus.BTMAssetID,
+ },
+ },
+ },
+ bc.Hash{V0: 1}: &bc.IntraChainOutput{
+ Source: &bc.ValueSource{
+ Value: &bc.AssetAmount{
+ AssetId: consensus.BTMAssetID,
+ Amount: uint64(100),
+ },
+ },
+ },
+}
+
var voteEntry = map[bc.Hash]bc.Entry{
bc.Hash{V0: 0}: &bc.VoteOutput{
Source: &bc.ValueSource{
TxHeader: &bc.TxHeader{
ResultIds: []*bc.Hash{
&bc.Hash{V0: 0},
+ &bc.Hash{V0: 1},
},
},
SpentOutputIDs: []bc.Hash{},
- Entries: defaultEntry,
+ Entries: coinbaseEntry,
},
},
},
inputView: NewUtxoViewpoint(),
fetchView: &UtxoViewpoint{
Entries: map[bc.Hash]*storage.UtxoEntry{
- bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false),
+ bc.Hash{V0: 1}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false),
},
},
err: false,
},
},
inputView: NewUtxoViewpoint(),
- fetchView: &UtxoViewpoint{
- Entries: map[bc.Hash]*storage.UtxoEntry{
- bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.CoinbaseUTXOType, 0, false),
- },
- },
+ fetchView: NewUtxoViewpoint(),
gasOnlyTx: true,
err: false,
},
TxHeader: &bc.TxHeader{
ResultIds: []*bc.Hash{
&bc.Hash{V0: 0},
+ &bc.Hash{V0: 1},
},
},
SpentOutputIDs: []bc.Hash{},
- Entries: defaultEntry,
+ Entries: coinbaseEntry,
},
},
},
- inputView: NewUtxoViewpoint(),
+ inputView: &UtxoViewpoint{
+ Entries: map[bc.Hash]*storage.UtxoEntry{
+ bc.Hash{V0: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, false),
+ },
+ },
fetchView: &UtxoViewpoint{
Entries: map[bc.Hash]*storage.UtxoEntry{
- bc.Hash{V0: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true),
+ bc.Hash{V0: 1}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true),
},
},
err: false,
},
},
inputView: NewUtxoViewpoint(),
- fetchView: &UtxoViewpoint{
- Entries: map[bc.Hash]*storage.UtxoEntry{
- bc.Hash{V1: 0}: storage.NewUtxoEntry(storage.NormalUTXOType, 0, true),
- },
- },
+ fetchView: NewUtxoViewpoint(),
gasOnlyTx: true,
err: false,
},