Merge pull request #1323 from Roasbeef/accept-duplicate-waiting-proofs

channeldb: don't reject duplicate waiting proofs
This commit is contained in:
Olaoluwa Osuntokun 2018-06-05 19:20:29 -07:00 committed by GitHub
commit 1d994439e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,10 +56,6 @@ func NewWaitingProofStore(db *DB) (*WaitingProofStore, error) {
// Add adds new waiting proof in the storage.
func (s *WaitingProofStore) Add(proof *WaitingProof) error {
if _, ok := s.cache[proof.Key()]; ok {
return ErrWaitingProofAlreadyExist
}
return s.db.Batch(func(tx *bolt.Tx) error {
var err error
var b bytes.Buffer
@ -81,6 +77,7 @@ func (s *WaitingProofStore) Add(proof *WaitingProof) error {
}
s.cache[proof.Key()] = struct{}{}
return nil
})
}