Skip to content

Problem with fee #1026

@matiu

Description

@matiu
var b = require('bitcore');
var inputs = 
  [ { txid: 'e872a0fda0afd0bce31ddfd9229c9eca2a68e4746615b8a0902b7a657b83676d',
    vout: 8,
    amount: 100,
    scriptPubKey: 'a914a8a9648754fbda1b6c208ac9d4e252075447f36887' } ] ;

var t = new b.Transaction()
  .from(inputs)
  .to('18PzpUFkFZE8zKWUPvfykkTxmB9oMR8qP7', 80)
  .change('3CauZ5JUFfmSAx2yANvCRoNXccZ3YSUjXH');

t.serialize();

throws:

/bitcore/lib/transaction/transaction.js:125
      throw new errors.Transaction.FeeError(feeError);
            ^
Fees are not correctly set Fee is more than 15 times the suggested amount
Error
    at Error.bitcore.Error.Transaction.FeeError 

shouldn't the fee be automatically assigned in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions