You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
630 B
37 lines
630 B
3 years ago
|
package remote
|
||
|
|
||
|
import (
|
||
|
"github.com/ethereum/go-ethereum/ethdb"
|
||
|
)
|
||
|
|
||
|
// NopRemoteBatch on readonly mode, write operator will be reject
|
||
|
type NopRemoteBatch struct {
|
||
|
}
|
||
|
|
||
|
func newNopRemoteBatch(db *RemoteDatabase) *NopRemoteBatch {
|
||
|
return &NopRemoteBatch{}
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) Put(key []byte, value []byte) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) Delete(key []byte) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) ValueSize() int {
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) Write() error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) Reset() {
|
||
|
}
|
||
|
|
||
|
func (b *NopRemoteBatch) Replay(w ethdb.KeyValueWriter) error {
|
||
|
return nil
|
||
|
}
|