mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
ecb10e8548
* save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * Squashed 'interfaces/' content from commit e5b1945d0 git-subtree-dir: interfaces git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184 * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save
44 lines
697 B
Go
44 lines
697 B
Go
package snapshotsync
|
|
|
|
/*
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestSnapshotMode(t *testing.T) {
|
|
sm := SnapshotMode{}
|
|
sm.Receipts = true
|
|
if sm.ToString() != "r" {
|
|
t.Fatal(sm.ToString())
|
|
}
|
|
sm.State = true
|
|
if sm.ToString() != "sr" {
|
|
t.Fatal(sm.ToString())
|
|
}
|
|
sm.Bodies = true
|
|
if sm.ToString() != "bsr" {
|
|
t.Fatal(sm.ToString())
|
|
}
|
|
sm.Headers = true
|
|
if sm.ToString() != "hbsr" {
|
|
t.Fatal(sm.ToString())
|
|
}
|
|
}
|
|
|
|
func TestSnapshotModeFromString(t *testing.T) {
|
|
sm, err := SnapshotModeFromString("hsbr")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if reflect.DeepEqual(sm, SnapshotMode{
|
|
Headers: true,
|
|
Bodies: true,
|
|
State: true,
|
|
Receipts: true,
|
|
}) == false {
|
|
t.Fatal(sm)
|
|
}
|
|
}
|
|
*/
|