diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2016-05-04 16:07:57 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2016-05-04 16:07:57 -0400 |
| commit | 7062dde54e8fa527e785209209d3cd7d90848891 (patch) | |
| tree | 7cf75dd1006298af3d5fc21a1f16809d9b975581 | |
| parent | 867f3654993a7e6f30009316d301b0f040dab224 (diff) | |
| download | pos-7062dde54e8fa527e785209209d3cd7d90848891.tar.gz | |
Handle cases where the database already exists and we just want to read from it
| -rw-r--r-- | merkle.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -124,7 +124,7 @@ type PostMerkle struct { } func NewPostMerkle(height int64, fname string) *PostMerkle { - file, err := os.Create(fname) + file, err := os.OpenFile(fname, os.O_RDWR|os.O_CREATE, 0666) if err != nil { panic(err) } |
