Skip to content

Commit 29ca388

Browse files
committed
[ETCM-213] Fix merge conflicts
1 parent 6e7bb45 commit 29ca388

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/it/scala/io/iohk/ethereum/sync/util/FastSyncItSpecUtils.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import akka.util.ByteString
44
import cats.effect.Resource
55
import io.iohk.ethereum.Mocks.MockValidatorsAlwaysSucceed
66
import io.iohk.ethereum.blockchain.sync.FastSync
7+
import io.iohk.ethereum.blockchain.sync.FastSync.SyncState
78
import io.iohk.ethereum.crypto.kec256
89
import io.iohk.ethereum.domain.Address
910
import io.iohk.ethereum.mpt.{HashNode, MptNode, MptTraversals}
@@ -89,6 +90,17 @@ object FastSyncItSpecUtils {
8990

9091
go(0)
9192
}
93+
94+
def startWithState(): Task[Unit] = {
95+
Task {
96+
val currentBest = bl.getBestBlock().header
97+
val safeTarget = currentBest.number + syncConfig.fastSyncBlockValidationX
98+
val nextToValidate = currentBest.number + 1
99+
val syncState = SyncState(currentBest, safeTarget, Seq(), Seq(), 0, 0, currentBest.number, nextToValidate)
100+
storagesInstance.storages.fastSyncStateStorage.putSyncState(syncState)
101+
}.map(_ => ())
102+
}
103+
92104
}
93105

94106
object FakePeer {

src/it/scala/io/iohk/ethereum/txExecTest/util/DumpChainApp.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ import io.iohk.ethereum.nodebuilder.{AuthHandshakerBuilder, NodeKeyBuilder, Secu
2222
import io.iohk.ethereum.utils.{Config, NodeStatus, ServerStatus}
2323
import java.util.concurrent.atomic.AtomicReference
2424

25-
import io.iohk.ethereum.db.dataSource.DataSourceBatchUpdate
25+
import io.iohk.ethereum.db.dataSource.{DataSourceBatchUpdate, RocksDbDataSource}
2626
import org.bouncycastle.util.encoders.Hex
2727

2828
import scala.concurrent.duration._
2929
import io.iohk.ethereum.domain.BlockHeader.HeaderExtraFields.HefEmpty
30+
import monix.reactive.Observable
3031

3132
object DumpChainApp extends App with NodeKeyBuilder with SecureRandomBuilder with AuthHandshakerBuilder {
3233
val conf = ConfigFactory.load("txExecTest/chainDump.conf")
@@ -194,4 +195,6 @@ class BlockchainMock(genesisHash: ByteString) extends Blockchain {
194195
override def getStateStorage: StateStorage = ???
195196

196197
override def getLatestCheckpointBlockNumber(): BigInt = ???
198+
199+
override def mptStateSavedKeys(): Observable[Either[RocksDbDataSource.IterationError, NodeHash]] = ???
197200
}

0 commit comments

Comments
 (0)