@@ -2,7 +2,7 @@ import { test } from '../tools/prepare-test-env-ava';
2
2
3
3
// eslint-disable-next-line import/order
4
4
import {
5
- initSwingStore ,
5
+ initSimpleSwingStore ,
6
6
getAllState ,
7
7
setAllState ,
8
8
} from '@agoric/swing-store-simple' ;
@@ -68,12 +68,12 @@ function testStorage(t, s, getState, commit) {
68
68
}
69
69
70
70
test ( 'storageInMemory' , t => {
71
- const store = initSwingStore ( ) ;
71
+ const store = initSimpleSwingStore ( ) ;
72
72
testStorage ( t , store . kvStore , ( ) => getAllState ( store ) . kvStuff , null ) ;
73
73
} ) ;
74
74
75
75
function buildHostDBAndGetState ( ) {
76
- const store = initSwingStore ( ) ;
76
+ const store = initSimpleSwingStore ( ) ;
77
77
const hostDB = buildHostDBInMemory ( store . kvStore ) ;
78
78
return { hostDB, getState : ( ) => getAllState ( store ) . kvStuff } ;
79
79
}
@@ -119,13 +119,13 @@ test('blockBuffer fulfills storage API', t => {
119
119
} ) ;
120
120
121
121
test ( 'guardStorage fulfills storage API' , t => {
122
- const store = initSwingStore ( ) ;
122
+ const store = initSimpleSwingStore ( ) ;
123
123
const guardedHostStorage = guardStorage ( store . kvStore ) ;
124
124
testStorage ( t , guardedHostStorage , ( ) => getAllState ( store ) . kvStuff , null ) ;
125
125
} ) ;
126
126
127
127
test ( 'crankBuffer fulfills storage API' , t => {
128
- const store = initSwingStore ( ) ;
128
+ const store = initSimpleSwingStore ( ) ;
129
129
const { crankBuffer, commitCrank } = buildCrankBuffer ( store . kvStore ) ;
130
130
testStorage ( t , crankBuffer , ( ) => getAllState ( store ) . kvStuff , commitCrank ) ;
131
131
} ) ;
@@ -186,7 +186,7 @@ test('crankBuffer can abortCrank', t => {
186
186
} ) ;
187
187
188
188
test ( 'storage helpers' , t => {
189
- const store = initSwingStore ( ) ;
189
+ const store = initSimpleSwingStore ( ) ;
190
190
const s = addHelpers ( store . kvStore ) ;
191
191
192
192
s . set ( 'foo.0' , 'f0' ) ;
@@ -236,7 +236,7 @@ test('storage helpers', t => {
236
236
} ) ;
237
237
238
238
function buildKeeperStorageInMemory ( ) {
239
- const store = initSwingStore ( ) ;
239
+ const store = initSimpleSwingStore ( ) ;
240
240
const { kvStore, streamStore } = store ;
241
241
const { enhancedCrankBuffer, commitCrank } = wrapStorage ( kvStore ) ;
242
242
return {
@@ -248,7 +248,7 @@ function buildKeeperStorageInMemory() {
248
248
}
249
249
250
250
function duplicateKeeper ( getState ) {
251
- const store = initSwingStore ( ) ;
251
+ const store = initSimpleSwingStore ( ) ;
252
252
const { kvStore, streamStore } = store ;
253
253
setAllState ( store , { kvStuff : getState ( ) , streamStuff : new Map ( ) } ) ;
254
254
const { enhancedCrankBuffer } = wrapStorage ( kvStore ) ;
0 commit comments