docs: Update changelog.
This commit is contained in:
parent
4b426bead4
commit
1f0f0d8c3c
3 changed files with 19 additions and 13 deletions
|
|
@ -3,7 +3,7 @@
|
|||
## Unreleased
|
||||
|
||||
**When upgrading to this version of hsd, you must pass `--chain-migrate=4`
|
||||
and `--wallet-migrate=6` when you run it for the first time.**
|
||||
and `--wallet-migrate=7` when you run it for the first time.**
|
||||
|
||||
### Wallet Changes
|
||||
|
||||
|
|
@ -14,6 +14,12 @@ and `--wallet-migrate=6` when you run it for the first time.**
|
|||
the namestate when the wallet owns the name.
|
||||
- Introduce admin `POST /recalculate-balances`, useful if the post-migration
|
||||
recalculation was not triggered and wallet balances are not correct.
|
||||
- The TX creation HTTP Endpoints now supports new values for the `selection`
|
||||
property. These new strategies use database iterators instead of loading all
|
||||
coins into RAM.
|
||||
- `db-value` - This is a database alternative to `value` and new default.
|
||||
- `db-age` - A database alternative `age`.
|
||||
- `db-all` - A database alternative `all`.
|
||||
|
||||
#### Wallet/WalletDB API
|
||||
- `Wallet.zap` now returns the number of transactions zapped instead of their hashes.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ const MTX = require('../../../lib/primitives/mtx');
|
|||
const {Resource} = require('../../../lib/dns/resource');
|
||||
const WalletDB = require('../../../lib/wallet/walletdb');
|
||||
const wutils = require('../../util/wallet');
|
||||
const mutils = require('../../util/migrations');
|
||||
|
||||
const network = Network.get('regtest');
|
||||
|
||||
|
|
@ -331,9 +332,8 @@ async function getMigrationDump(wdb) {
|
|||
|
||||
const val = layout.txdb[key];
|
||||
|
||||
assert(val.id.toString('hex') === str2hex(key));
|
||||
// const prefix = str2hex(key);
|
||||
const prefix = key.charCodeAt(0).toString(16);
|
||||
assert(val.id.toString('hex') === mutils.prefix2hex(key));
|
||||
const prefix = mutils.prefix2hex(key);
|
||||
prefixes.push(tprefix + prefix);
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +345,3 @@ async function getMigrationDump(wdb) {
|
|||
prefixes
|
||||
};
|
||||
}
|
||||
|
||||
function str2hex(key) {
|
||||
return Buffer.from(key, 'utf8').toString('hex');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,11 +108,15 @@ async function mkOutput(wallet, outputInfo, options = {}) {
|
|||
createAddress = true
|
||||
} = options;
|
||||
|
||||
if (!info.address && !createAddress) {
|
||||
info.address = await wallet.receiveAddress(outputInfo.account || 0);
|
||||
} else if (!info.address && createAddress) {
|
||||
const walletKey = await wallet.createReceive(outputInfo.account || 0);
|
||||
info.address = walletKey.getAddress();
|
||||
if (!info.address) {
|
||||
const account = outputInfo.account || 0;
|
||||
|
||||
if (createAddress) {
|
||||
const walletKey = await wallet.createReceive(account);
|
||||
info.address = walletKey.getAddress();
|
||||
} else {
|
||||
info.address = await wallet.receiveAddress(account);
|
||||
}
|
||||
}
|
||||
|
||||
return makeOutput(info);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue