going ahead and indexing the entire uncle blocks (one of the issues open on public); finish tests

This commit is contained in:
Ian Norden
2019-04-02 14:32:30 -05:00
parent fd407825c1
commit 197f98c93d
11 changed files with 201 additions and 91 deletions
+12 -1
View File
@@ -73,7 +73,7 @@ func GetFakeTransaction(hash string, receipt core.Receipt) core.TransactionModel
var raw bytes.Buffer
err := gethTransaction.EncodeRLP(&raw)
if err != nil {
panic("failed to marshal transaction creating test fake")
panic("failed to marshal transaction while creating test fake")
}
return core.TransactionModel{
Data: []byte{},
@@ -89,3 +89,14 @@ func GetFakeTransaction(hash string, receipt core.Receipt) core.TransactionModel
Value: "0",
}
}
func GetFakeUncle(hash, reward string) core.Uncle {
return core.Uncle{
Miner: FakeAddress.String(),
Hash: hash,
BlockHash: FakeHash.String(),
Reward: reward,
Raw: rawFakeHeader,
Timestamp: strconv.FormatInt(fakeTimestamp, 10),
}
}