Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kjezek/enable ethereum test #223

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions gossip/evmstore/carmen.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ func (c *CarmenStateDB) GetLogs(txHash common.Hash, blockHash common.Hash) []*ty
return logs
}

func (c *CarmenStateDB) Logs() []*types.Log {
carmenLogs := c.db.GetLogs()
logs := make([]*types.Log, len(carmenLogs))
for i, clog := range carmenLogs {
log := &types.Log{
Address: common.Address(clog.Address),
Topics: nil,
Data: clog.Data,
BlockNumber: c.blockNum,
TxHash: c.txHash,
TxIndex: uint(c.txIndex),
Index: clog.Index,
}
for _, topic := range clog.Topics {
log.Topics = append(log.Topics, common.Hash(topic))
}
logs[i] = log
}
return logs
}

func (c *CarmenStateDB) AddPreimage(hash common.Hash, preimage []byte) {
// ignored - preimages of keys hashes are relevant only for geth trie
}
Expand Down
1 change: 1 addition & 0 deletions inter/state/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type StateDB interface {

Error() error
GetLogs(hash common.Hash, blockHash common.Hash) []*types.Log
Logs() []*types.Log
SetTxContext(thash common.Hash, ti int)
TxIndex() int
GetProof(addr common.Address, keys []common.Hash) (witness.Proof, error)
Expand Down
85 changes: 85 additions & 0 deletions tests/gen_stenv.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions tests/gen_sttransaction.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading