ShibeTechnology / dogecoin-spv-node

A Dogecoin SPV wallet
Other
10 stars 4 forks source link

Review the tx format in the database #35

Open rllola opened 11 months ago

rllola commented 11 months ago

Currently a tx is saved like this

{
  key: '15aa1367992d2004e31881e8f538583709f282c89f6acdd79d4e0d284c4eefee00000000',
  value: {
    id: '15aa1367992d2004e31881e8f538583709f282c89f6acdd79d4e0d284c4eefee',
    version: 1,
    txInCount: 1,
    txIns: [ [Object] ],
    txOutCount: 2,
    txOuts: [ [Object], [Object] ],
    locktime: 3621196,
    size: 226
  }
}

The txInCount and txOutCount are redundant information here as we cna query the length of the arrays for txins and txouts.

We probably also want the block hash info for each tx or at least the height.