Skip to content

Commit 5bc5cd6

Browse files
committed
chore: fixes after rebase
1 parent 7d2a326 commit 5bc5cd6

44 files changed

Lines changed: 93 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

blockchain/blockchain_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import (
88
"github.com/NethermindEth/juno/blockchain"
99
"github.com/NethermindEth/juno/clients/feeder"
1010
"github.com/NethermindEth/juno/core"
11+
"github.com/NethermindEth/juno/core/deprecatedstate"
1112
"github.com/NethermindEth/juno/core/felt"
1213
"github.com/NethermindEth/juno/core/pending"
1314
"github.com/NethermindEth/juno/core/state"
14-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
15+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1516
"github.com/NethermindEth/juno/core/trie2/triedb"
1617
"github.com/NethermindEth/juno/db"
1718
"github.com/NethermindEth/juno/db/memory"
@@ -1096,6 +1097,6 @@ func chainStateCommitment(t *testing.T, database db.KeyValueStore) (felt.Felt, e
10961097
return st.Commitment(header.ProtocolVersion)
10971098
} else {
10981099
txn := database.NewIndexedBatch()
1099-
return core.NewDeprecatedState(txn).Commitment(header.ProtocolVersion)
1100+
return deprecatedstate.New(txn).Commitment(header.ProtocolVersion)
11001101
}
11011102
}

cmd/juno/dbcmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/NethermindEth/juno/clients/feeder"
99
juno "github.com/NethermindEth/juno/cmd/juno"
1010
"github.com/NethermindEth/juno/core"
11-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
11+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1212
"github.com/NethermindEth/juno/db/pebblev2"
1313
adaptfeeder "github.com/NethermindEth/juno/starknetdata/feeder"
1414
"github.com/NethermindEth/juno/utils"

consensus/consensus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/NethermindEth/juno/consensus/starknet"
1616
"github.com/NethermindEth/juno/core"
1717
"github.com/NethermindEth/juno/core/felt"
18-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
18+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1919
"github.com/NethermindEth/juno/db/memory"
2020
"github.com/NethermindEth/juno/genesis"
2121
"github.com/NethermindEth/juno/p2p/dht"

consensus/p2p/validator/empty_fixtures_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/NethermindEth/juno/core"
1111
"github.com/NethermindEth/juno/core/felt"
1212
"github.com/NethermindEth/juno/core/pending"
13-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
13+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1414
"github.com/NethermindEth/juno/db"
1515
"github.com/NethermindEth/juno/utils"
1616
"github.com/starknet-io/starknet-p2p-specs/p2p/proto/common"

consensus/p2p/validator/fixtures_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/NethermindEth/juno/core"
1616
"github.com/NethermindEth/juno/core/felt"
1717
"github.com/NethermindEth/juno/core/pending"
18-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
18+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1919
"github.com/NethermindEth/juno/db"
2020
"github.com/NethermindEth/juno/starknet"
2121
adaptfeeder "github.com/NethermindEth/juno/starknetdata/feeder"

consensus/p2p/validator/proposal_stream_demux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/NethermindEth/juno/consensus/starknet"
1313
"github.com/NethermindEth/juno/consensus/types"
1414
"github.com/NethermindEth/juno/core/felt"
15-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
15+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1616
"github.com/NethermindEth/juno/db"
1717
"github.com/NethermindEth/juno/db/memory"
1818
"github.com/NethermindEth/juno/p2p/pubsub/testutils"

consensus/p2p/validator/transition_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/NethermindEth/juno/consensus/types"
1111
"github.com/NethermindEth/juno/core"
1212
"github.com/NethermindEth/juno/core/felt"
13-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
13+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1414
"github.com/NethermindEth/juno/db/memory"
1515
"github.com/NethermindEth/juno/genesis"
1616
"github.com/NethermindEth/juno/mempool"

consensus/proposer/proposer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/NethermindEth/juno/consensus/types"
1616
"github.com/NethermindEth/juno/core"
1717
"github.com/NethermindEth/juno/core/felt"
18-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
18+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1919
"github.com/NethermindEth/juno/db/memory"
2020
"github.com/NethermindEth/juno/genesis"
2121
"github.com/NethermindEth/juno/mempool"

core/running_event_filter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/NethermindEth/juno/clients/feeder"
88
"github.com/NethermindEth/juno/core"
99
"github.com/NethermindEth/juno/core/felt"
10-
statetestutils "github.com/NethermindEth/juno/core/state/statetestutils"
10+
statetestutils "github.com/NethermindEth/juno/core/state/testutils"
1111
"github.com/NethermindEth/juno/db"
1212
"github.com/NethermindEth/juno/db/memory"
1313
"github.com/NethermindEth/juno/encoder"

core/state/accessors.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ func GetStateObject(r db.KeyValueReader, state *State, addr *felt.Felt) (*stateO
2222
// Returns db.ErrKeyNotFound when the contract does not exist, for backward compatibility.
2323
// TODO: return more precise error (e.g. ErrContractNotDeployed) once deprecated state is removed.
2424
func GetContract(r db.KeyValueReader, addr *felt.Felt) (stateContract, error) {
25-
return getContract(r, addr)
26-
}
27-
28-
// Gets a contract instance from the database.
29-
func getContract(r db.KeyValueReader, addr *felt.Felt) (stateContract, error) {
3025
key := db.ContractKey(addr)
3126
var contract stateContract
3227
if err := r.Get(key, func(val []byte) error {

0 commit comments

Comments
 (0)