DummyDatabase is a dummy "remote database" which actually save all data to key, i.e. key is data, data is key. It does not save data to any store, but to the returned key. It is used to serve as an extremely stable remote database. For example, PrivateTx could use it as an option of its "remote data
| 6 | // It does not save data to any store, but to the returned key. It is used to serve as an extremely stable remote database. |
| 7 | // For example, PrivateTx could use it as an option of its "remote database" to ensure that it does not depend on any "single point" database. |
| 8 | type DummyDatabase struct { |
| 9 | } |
| 10 | |
| 11 | func (d *DummyDatabase) Get(key []byte) ([]byte, error) { |
| 12 | return key, nil |
nothing calls this directly
no outgoing calls
no test coverage detected