Add link when throwing a serialization error
This commit is contained in:
parent
97671abfdc
commit
2f86f323c0
|
@ -161,7 +161,7 @@ These are the current default values in the Bitcore library involved on these ch
|
|||
|
||||
* `Transaction.FEE_PER_KB`: `10000` (satoshis per kilobyte)
|
||||
* `Transaction.FEE_SECURITY_MARGIN`: `15`
|
||||
* `Transaction.DUST_AMOUNT`: 5460 (satoshis)
|
||||
* `Transaction.DUST_AMOUNT`: `5460` (satoshis)
|
||||
|
||||
## Fee calculation
|
||||
|
||||
|
|
|
@ -153,6 +153,8 @@ Transaction.prototype.uncheckedSerialize = Transaction.prototype.toString = func
|
|||
Transaction.prototype.checkedSerialize = function(opts) {
|
||||
var serializationError = this.getSerializationError(opts);
|
||||
if (serializationError) {
|
||||
serializationError.message += ' Use Transaction#uncheckedSerialize if you want to skip security checks. ' +
|
||||
'See http://bitcore.io/guide/transaction.html#Serialization for more info.'
|
||||
throw serializationError;
|
||||
}
|
||||
return this.uncheckedSerialize();
|
||||
|
|
Loading…
Reference in New Issue