Author Topic: Adding new field to account objects  (Read 311 times)

0 Members and 1 Guest are viewing this topic.

Offline dmantis

  • Newbie
  • *
  • Posts: 1
    • View Profile
Adding new field to account objects
« on: April 10, 2018, 07:51:34 pm »
We'd like to experiment with BitShares blockchain and research the possibility of extending accounts objects with with additinal fields.

We have tried to extend account_create_operation fields in wallet.cpp and add field in account_object.hpp abd have some success writing data to blockchain but we can't to get it back via wallet or RPC API.

Moreover, we see the extention struct, but there is the lack of documentation about it. Is it expected to be used in such cases?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12636
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Adding new field to account objects
« Reply #1 on: April 13, 2018, 11:10:44 am »
you need to extend the `account_update` operation, too to actually store stuff on the blockchain.
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3295
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Adding new field to account objects
« Reply #2 on: April 14, 2018, 06:29:02 pm »
If you're running your own chain, it's flexible to change many things. However, if you want to change the BitShares chain, it requires consensus, since blockchain by nature need all nodes to agree on all transactions, if you change your node or wallet only, it's useless.
« Last Edit: April 14, 2018, 06:30:40 pm by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit