database: use db.DeleteIndex instead of calling deleteIndex directly
The db.DeleteIndex method checks that db.RemoteClient is not nil
before dereferencing it. The direct call to deleteIndex did not,
and therefore panicked when db.RemoteClient was nil.
This makes Database.Block method consistent with Database.Put and
Database.Delete, which also use the db.DeleteIndex method.
With this change, go test ./database passes.
Reviewed-by: Tuo Shan <firstname.lastname@example.org>
1 file changed