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