Commit graph

6 commits

Author SHA1 Message Date
Roman Khimov
064636768b core/native: move ValidatorsCount processing into native NEO contract 2020-04-27 12:30:39 +03:00
Roman Khimov
3476a18fa9 core/native: store validators in NEO native contract state
This technically breaks voting with UTXO-based NEO (processTXWithValidators*),
but we're moving towards the new system.
2020-04-27 12:30:39 +03:00
Roman Khimov
30836ca69b core/native: untangle native contracts initialization
The notion of NativeContractState shouldn't ever existed, native contract is a
contract and its state is saved as regular contract state which is critical
because we'll have MPT calculations over this state soon.

Initial minting should be done in Neo.Native.Deploy because it generates
notification that should have proper transaction context.

RegisterNative() shouldn't exist as a public method, native contracts are only
registered at block 0 and they can do it internally, no outside user should be
able to mess with it.

Move some structures from `native` package to `interop` also to avoid circular
references as interop.Context has to have a list of native contracts (exposing
them via Blockchainer is again too dangerous, it's too powerful tool).
2020-04-27 12:30:39 +03:00
Evgenii Stratonikov
76700f31cf core: implement skeletons for NEO/GAS native contracts 2020-04-16 15:55:35 +03:00
Evgenii Stratonikov
a71cd0961e core/dao: remove unnecessary slice type
It is used only once, so a simple `sort.Slice`
invocation will suffice.
2020-04-08 08:38:45 +03:00
Evgenii Stratonikov
030b7754ad core: move DAO to a separate package 2020-04-08 08:38:44 +03:00
Renamed from pkg/core/dao.go (Browse further)