()
| 232 | } |
| 233 | |
| 234 | func (tx *TxObjectStorage) Commit() error { |
| 235 | for h, obj := range tx.Objects { |
| 236 | delete(tx.Objects, h) |
| 237 | if _, err := tx.Storage.SetEncodedObject(obj); err != nil { |
| 238 | return err |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | return nil |
| 243 | } |
| 244 | |
| 245 | func (tx *TxObjectStorage) Rollback() error { |
| 246 | tx.Objects = make(map[plumbing.Hash]plumbing.EncodedObject) |
nothing calls this directly
no test coverage detected