[zcash/zcash] Always write the empty root down as the best root, since we may roll back (#3463)

In [`3577de83`](https://github.com/zcash/zcash/commit/3577de83aa126fec4db8bb022dbeecf9a77a3af8) we started not writing the Sapling empty root down as the «best» anchor because we had changed the encodings and didn’t want users who compiled from master to have inconsistent coindb’s in the future if the encoding changed again for some reason.

However, if we don’t write the empty root down then during rollbacks to Sapling activation we leave the best anchor on disk different from what’s in the cache, which will trigger an assertion.

This reverts the change from `3577de83` since we’ve settled on the encodings.
You can view, comment on, or merge this pull request online at:

https://github.com/zcash/zcash/pull/3463

— Commit Summary —

* Always write the empty root down as the best root, since we may roll back.

— File Changes —

M src/txdb.cpp (4)

— Patch Links —

https://github.com/zcash/zcash/pull/3463.patch
https://github.com/zcash/zcash/pull/3463.diff

Добавить комментарий