(VDB-298) Consume Pit contract storage diffs

- Continuously parse storage diffs CSV data to read Pit contract state
- Convert ilks in database to raw bytes32 value for use in generating
  storage keys dynamically
- Persist storage diffs with block number and hash for validation
This commit is contained in:
Rob Mulholand
2019-02-06 10:31:46 -06:00
parent c474933432
commit 867f92c431
85 changed files with 2143 additions and 79 deletions
+1 -2
View File
@@ -22,8 +22,7 @@ type Reader interface {
Read(path string) ([]byte, error)
}
type FsReader struct {
}
type FsReader struct{}
func (FsReader) Read(path string) ([]byte, error) {
return ioutil.ReadFile(path)
+15
View File
@@ -0,0 +1,15 @@
package fs
import "github.com/hpcloud/tail"
type Tailer interface {
Tail() (*tail.Tail, error)
}
type FileTailer struct {
Path string
}
func (tailer FileTailer) Tail() (*tail.Tail, error) {
return tail.TailFile(tailer.Path, tail.Config{Follow: true})
}